Basic JavaScript - Declare JavaScript Variables

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

var myname;"zika";

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Declare JavaScript Variables

Look at the given example again: var ourName;

Keep in mind that a semicolon ; indicates the end of a statement.

This exercise does not require a value to be assigned to the variable, you just need to declare the variable as in the example. Note the capitalization as well!

3 Likes

@zy68098 on top of what @pkdvalis has suggested javascript uses camel case notation to write variable names i.e first word being lower case and the preceeding words start with a capital letter

Example

var myVar;

var myAge;

Happy coding

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