This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript String Methods

Replace "Microsoft" with "W3Schools" in the paragraph below:

Please visit the www.Microsoft.com and the Microsoft Store!

function myFunction() {
  let text = document.getElementById("demo").innerHTML; 
  document.getElementById("demo").innerHTML =
  text.replace("Microsoft","W3Schools");
}

Although replace() only replaces the first match, pressing/clicking the 'Try it' button a second time will change the next match.