I'm taking Andrew Mead - Udemy course in Javascript. But I do have a question about the template string that was given on video.
return 'A ${percent}% tip on $${total} would be $${tip}'
This doesn't work when I'm typing it in vscode. However, for it to work in my vscode, I must type it in as
return "A " + percent + "% tip on $" + total + " would be $" + tip;
I have Babel Javascript and Prettier installed but wondering what exactly the cause of this code is not working correctly? Whenever I run the node arguments.js, it prints out as "A ${percent}% tip on $${total} would be $${tip}"
If I do the node arguments.js for the second code, it does print out, "A 20% tip on $60 would be $12"
I want to learn how to get the strings to work in various ways possible. Thank you in advance.