String (javascript)
< Language (javaScript JS)
< JavaScript
< Web Dev
< Web
< Computer Science
< Tech
< drone
Summary Returns a new string with some or all matches of a pattern replaced by a replacement . The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match. Syntax newstring = str .replace( regexp|substr , newSubStr|function[ , Non-standard flags] ); Parameters