Java variable doubt

Tell us what’s happening:

iam not able to the output of this challange

Your code so far

var myname = "beau";
myname = 23;

Your browser information:

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

Challenge: Declare JavaScript Variables

Link to the challenge:


  1. Check the casing on the variable name.

  2. Only declare the variable, you are not asked to assign it any value.

Understanding Case Sensitivity in Variables

1 Like

Hi @preeti2323!

Also, your answer only needs to be one line of code not two.

Hi @preeti2323
The only thing you have to do is create a variable called myName. No need of assigning values. The variable name should be myName. not myname.

a pretty important thing: this is JavaScript, not Java - they may seem related based on the name, but they are pretty different things