New to Visual Studio Code and Node here.
I wrote this line of code as part of a tutorial and run it through node.
const textOut = 'This is what we know about the avocado: ${textIn}.\nCreated on ${Date.now()}';
and the ${textIn}
and ${Date.now()}
do not generate the JavaScript as it should, but when I copy and paste the line directly from the tutorial
const textOut = `This is what we know about the avocado: ${textIn}.\nCreated on ${Date.now()}`;
it works perfectly. I did notice that on the line directly from the tutorial, the JavaScript portion is a different color but not on the one I wrote. Is there something I'm supposed to be doing to format JavaScript in Visual Studio Code?
I tried finding solutions online to no help.