Append to string variable [closed] Append to string variable [closed] javascript javascript

Append to string variable [closed]


Like this:

var str = 'blah blah blah';str += ' blah';str += ' ' + 'and some more blah';


var str1 = 'abc';var str2 = str1+' def'; // str2 is now 'abc def'


var str1 = "add";str1 = str1 + " ";

Hope that helps,

Dan