Answers for "js add string to beginning of string"

1

js add string to beginning of string

var mystr = 'is my name.';
mystr = mystr.replace (/^/,'John ');

console.log(mystr);
 Run code snippet
Posted by: Guest on April-28-2022

Code answers related to "js add string to beginning of string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language