how to add two string variables in javascript code example
Example 1: js concatenate strings
const str1 = 'Hello';
const str2 = 'World';
console.log(str1 + str2);
>> HelloWorld
console.log(str1 + ' ' + str2);
>> Hello World
Example 2: javascript join 2 variables into string
A = 'hello ';
B = 'world!';
// outputs "hello world!"
console.log(A + B);