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

Try to replace "Microsoft" with "W3Schools" in the paragraph below:

Please visit Microsoft!

<button onclick="myFunction()">Try it</button>

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

The replace() method is case sensitive. MICROSOFT (with upper-case) will not be replaced.