24 Variables - whatis wrong


#1

I'm trying to "Create a variable called myAge and type in your age. "
I tried this"console.log(var myAge === "sixty six"; ) and many other things
What is the answer?


#2

Do you mean you are trying to prompt the user for an integer input and you want to store it in a variable age?


#3

I am trying to "Create a variable called myAge and type in your age. " as written in the instructions in the "Getting started with programming series" in lesson 24. I am unable to move on to lesson 25 until I put in the correct answer


#4

i.e

This is what you want to achieve right?prompting the user means you are trying to ask the user to enter his/her age


#5

ok but I still can't find an answer

example b in the lesson says var myAge = 30;

when I type in console.log(var myAge = 66;); it doesn't work

nor does console.log(var myAge === 66;);
( the prompt suggests 3 =)

can u confirm that the correct answer works when entered in the lesson?


#6

you have defined a variable here

the = is an assignment operator. to log myAge to console all you have to do is

console.log(myAge);

#7

thanks for your help