Basic JavaScript - Declare JavaScript Variables

I have some doubt in declare javascript variables

Your code so far

//Example
var ourname;

//Declare myname below this line

var myname;

var one = 1;


var two = 2;



console.log(myName);

console.log(one+two);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.52

Challenge: Basic JavaScript - Declare JavaScript Variables

Link to the challenge:

What is your question please?

You should be getting an error in the console because of you trying to console.log something you did not declare pointing to your problem, ReferenceError: myName is not defined. Javascript is case sensitive. Double check your declared variables, and make sure they match the test exactly it terms of case.

And just a heads up, the tests later on are also going to expect some of the results to be exactly what is asked also in terms of case.

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