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 all occurrences of "Microsoft" with "W3Schools" in the paragraph below:

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

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