If you want to find and replace parts of a string in JavaScript, you can use the replace function:

 

Code

var str = "This is Microsoft"

str = str.replace("Microsoft", "ADA ICT");

document.write(str);

 

Output

This is ADA ICT

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.