var str1 = "Hello "; var str2 = "world!"; var res = str1.concat(str2); // does not change the existing strings, but // returns a new string containing the text // of the joined strings.
const helloName = name => `Hello ${name}!`
const str1 = 'Hello'; const str2 = 'World'; console.log(str1 + str2); >> HelloWorld console.log(str1 + ' ' + str2); >> Hello World