Basic JavaScript - Initializing Variables with the Assignment Operator

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

var vara;
vara= 9;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0

Challenge Information:

Basic JavaScript - Initializing Variables with the Assignment Operator

Hi
That’s supposed to work but if it doesn’t stick to declaring and initializing a variable in the same line like so

var x=8;

Hope that helps;

You should be declaring a variable a, using the var keyword. You have declared a variable vara.

1 Like