This method joins the text contained in one string with the text from other specified strings and returns a new string.
This method joins the text contained in one string with the text from other specified strings and returns a new string.
myString1 = new String("This demonstrates the ")
myString2 = new String("concat method.")
document.write(myString1.concat(myString2))This demonstrates the concat method.This code combines the text contained in two specified strings and writes the concatenated string to the document.