Answers for "javascript replace string by another"

64

javascript replace string

var str = "JavaScript replace method test";
var res = str.replace("test", "success");  
//res = Javscript replace method success
Posted by: Guest on July-10-2020
1

replace all js

let a = 'a a a a aaaa aa a a';
a.replace(/aa/g, 'bb');
// => "a a a a bbbb bb a a"
Posted by: Guest on August-27-2020
0

replace each string by another string javascript

str.split(search).join(replacement)
Posted by: Guest on February-05-2021

Code answers related to "javascript replace string by another"

Code answers related to "Javascript"

Browse Popular Code Answers by Language