Prepend text to beginning of string

Tags: , , , ,



What is the fastest method, to add a new value at the beginning of a string?

Answer

var mystr = "Doe";
mystr = "John " + mystr;

Wouldn’t this work for you?



Source: stackoverflow