26. It keeps saying to me that i did not declare my variable


#1

i have the same problem it keeps saying to me that i did not declare my variable
here is my code nonetheless it prints in the screen what im writing

// On line 2, declare a variable myName and give it your name.
var Myname = "George";
// On line 4, use console.log to print out the myName variable.
console.log(Myname);
// On line 7, change the value of myName to be just the first 2
// letters of your name.
var Myname = "Ge"
// On line 9, use console.log to print out the myName variable.
console.log(Myname);


26 Changing Variable values
#2

The error message is not exactly clear but you are spelling your variable like this:

Myname

And not this:

myName

These are not syntax errors. Your code does run correctly. However, you have to use the specific variable the instructions request or the course won't allow you to clear on a technicality.


#3

thank you very much i see now my mistake i ll get on it thanks again


#4

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