Does javascript have a method to replace part of a string without creating a new string? April 7, 2023 by Tarik No, strings in JavaScript are immutable.