Pls help out a new coder - my variables doesn't print


#1

Hello out there.
I just started programming today and already met som trouble in the tutorial.

Why does my variables not print in console?

Frederik


#2

@frederik_toft Did you read the instructions? It says for you to surround the text in backticks(`) instead of quotation marks.


#3

Maybe this will help :slight_smile: its a post about the different functions of single quotes, double quotes, and backticks. As far as I can tell, it looks like you need to use the graves key.


#4

I dont know why but I keep getting an error and it annoys me. It feels like javscript wont accept the interpolation. I have done exactly like the instructions tells me to do.


#5

Did you use the backticks + could we have another screenshot?

In addition, this is JavaScript, don’t forget the semi-colon after declaring your variables.


#6

SOLVED:

I found out i were using the wrong “signs” in the code. I dont the names og them but instead of using “.” i had to use . - See the picture

Thx for the help


#7

Alas! The famous backticks we were talking about.

For further reference (you need to learn the basics):

"" double quotes
'' single quotes
`` backticks


#8

Yea

I thought the single quotes was backticks but now i got that covered :slight_smile:

Thx for the help anyway


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.