When I attempt to use [$] to embed a variable inside of a console.log text string, it doesn’t change to a variable, but simply prints the name of the variable.
let userName = ‘Dennis’;
userName ? console.log(‘Hello, ${userName}!’) : console.log(‘Hello!’);
This prints Hello, ${userName}! Rather than Hello, Dennis!
I can’t figure out what I’m doing wrong??? Any help for this extreme newbie appreciated.
Dennis - Win10, latest Chrome