24. Variables SyntaxError: Unexpected token var


#1



https://www.codecademy.com/en/courses/getting-started-v2/4/1?curriculum_id=506324b3a7dffd00020bf661#


I am trying to create a variable by use (var myAge = 30); but it says SyntaxError: Unexpected token var


console.log(var myAge === 30);


#2

The problem is you are trying to assign inside of a console.log(), and incorrectly using === instead of =. :slight_smile:


#3

thanks for the help man!


#4

You're welcome!

Post again if you have a question! :slight_smile:


#5

console.log (var myAge === 44);

i did like this too but it came out SyntaxError: Unexpected token var please help me


#6

Nvr mine Got it :grinning:


#7