String Interp. 2 question - My name and favorite city

Stuck at String Interpolation II.

After I run my code, it shows up as this on the right side output: My name is {myName}. My city is {myCity}.

It should be My name is Tim. My favorite city is New York City.

Error message says: Did you interpolate your name and favorite city using ES6 string interpolation?

let Name= 'Tim';
let City= 'New York City';
console.log('My name is ${Name}. My favorite city is ${City}.');

the string needs to be enclosing in back-ticks (`), not apostrophes, if you want es6 string interpolation to happen


thank you very much!

1 Like