Answers for "type script replace all in a string"

6

str replace javascript all

str.replace(/abc/g, '');
Posted by: Guest on May-16-2020
-1

javascript replace all with variable

/**
*A better method for replacing strings is as follows:
**/
function replaceString(oldString, newString, fullString) {
  return fullS.split(oldS).join(newS)
}
replaceString('World', 'Web', 'Brave New World')//'Brave New Web'
replaceString('World', 'Web', 'World New World')//'Web New Web'
Posted by: Guest on December-15-2020

Code answers related to "type script replace all in a string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language