How to add text in javascript

You can add text in JavaScript using the concatenation operator (+) to join two strings together. For example:

var text1 = "Hello";
var text2 = "World";

var text3 = text1 + " " + text2;

console.log(text3); // Outputs "Hello World"