13.
Which JavaScript String method is used to combine the text of two or more strings and return a new string?
trim()
slice()
join()
concat()
Correct: D
The concat() method is used to concatenate multiple strings together and return a new string that contains the combined text. For example:
const string1 = "Hello, ";
const string2 = "world!";
const newString = string1.concat(string2);
console.log(newString); // Output: "Hello, world!"