Consider this code:
var age = 3;
console.log(\"I\'m \" + age + \" years old!\");
Are there any other ways to insert the value of a variabl
I can show you with an example:
function fullName(first, last) {
let fullName = first + " " + last;
return fullName;
}
function fullNameStringInterpolation(first, last) {
let fullName = `${first} ${last}`;
return fullName;
}
console.log('Old School: ' + fullName('Carlos', 'Gutierrez'));
console.log('New School: ' + fullNameStringInterpolation('Carlos', 'Gutierrez'));