Dear guys.
This is my code:
let myName = “John”;
let myCity = “NYC”;
console.log(My name is ${myName}. My favourite city is ${myCity}.
);
Note: the backticks ` are not visible in the console.log, but they are really there in my screen. It must be that the editor of the forum doesn’t allow them.
I get printed in the terminal: “My name is John. My favourite city is NYC.”
Nevertheless, I get an error message telling: “Did you interpolate myName
and myCity
using back ticks and ${}
?”
What is wrong?
Thanks for the feedbacks