This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Marc James Steele
about 9 years

I am stuck on 26/28. I dont understand what i have done wrong???

// On line 2, declare a variable myName and give it your name. var.myName = “Marc”; // 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. myName = myName.substring(0,2); // On line 9, use console.log to print out the myName variable. console.log(myName);

Answer 54c226849113cb4b70000ff7

0 votes

Permalink

var.myName = "Marc";

it is just

var myName

no . between you’ll later learn about the . but for now var is just a keyword which expects at least one space and a variable name after it.

points
Submitted by haxor789
about 9 years

3 comments

Marc James Steele about 9 years

Thanks :)

sakshi03 about 9 years

after remove ‘.’ still it is showing error??

haxor789 about 9 years

I can pass replacing the “.” with a space using the code above, maybe yours is slightly different and you should post it.