let str1 = "hello" let str2 = " world" console.log(str1+str2) // "hello world"
let str1 = "Hello"; let str2 = " Google"; let str3 = " Search"; console.log(str1.concat(str2,str3)) // "Hello Google Search"
The concat method returns the new string by combining the provided strings.
let arr = [ ] let raisedHand = "✋"; let baby = "👶 " arr.push(baby,raisedHand) console.log(arr.join('')) //"👶 ✋"
join() method is used combine the array of individual strings into a single string.