concatenate javascript variable code example
Example 1: how to concatenate strings and variables in javascript
const helloName = name => `Hello ${name}!`
Example 2: js concat variable and string
const txt = "My name is"
console.log(`${txt} Paul`);
Example 3: javascript join 2 variables into string
A = 'hello ';
B = 'world!';
// outputs "hello world!"
console.log(A + B);