Replace function not replacing [duplicate] November 5, 2022 by Tarik Assign the value back into thumb. thumb = thumb.replace("200.jpg", "640.jpg");