String Concatenation with Variables

If two strings are stored in variables they acan be concatenated using the + operator.

Example:

let myPet = 'armadillo';
console.log('I own a pet ' + myPet + '.');

// Output: I own a pet armadillo.

Last updated