Newbie - Magic 8 ball


Full newbie, trying to follow the steps to create the magic 8 ball project. Should ${userName} auto change colour? I copied exactly as the video walkthrough, but for some reason I can’t get it too change. When I run the code it says, “Hello, ${userName}”.

Probably a simple mistake that I can’t find! Thanks in advance!

1 Like

Google ‘strings interpolation’ and read it. You are using ‘single quotes’, it doesn’t work with $.If you want use $, you have use ‘Backtick’ key which is located above on ‘tab’ key in your keyboard. Sorry for my bad English.


phonegyi is correct.

The error you have made is using single quotes (‘’), instead of backticks (``). Hope this helps. Here’s the difference typed out in vs code, so you can see the difference:

Happy coding :slight_smile:

1 Like

Thank you so much peeps! :slight_smile:

In these color-coded syntax editors, pay attention to the colors of your text. Often it will ‘jar’ your memory on what’s wrong or at least point you in the right direction.