How to replace text in JavaScript

How to replace text in JavaScript

Working with text or strings in JavaScript is really interesting. In fact text or “String” as it is called in JavaScript is the most common data type that a JavaScript programmer would encounter quite often. And many a times your would come across...