1var str1 = "Hello ";
2var str2 = "world!";
3var res = str1.concat(str2);
4console.log(res);
1var one = 'Hello';
2var two = 'World';
3
4console.log(one + two);
5It will print: HelloWorld
6
7console.log(one + ' ' + two);
8It will print: Hello World
1var totn_string = '';
2
3console.log(totn_string.concat('Tech','On','The','Net'));
4
5//The following will be output to the web browser console log:
6
7TechOnTheNet
1 var dest = new String("");
2 var src = new String("aze");
3 ...
4 dest += src + src + src + src + src;