var string = "Javascript is fun"; var newString = string.replace("fun", "Awesome"); console.log(newString); // Javascript is Awesome