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

banner
Close banner
0 points
Submitted by CaptainBlak
almost 11 years

{solved} 03 What did I do wrong?

I am unsure what I am doing wrong in the script. The site said I am correct but I do not see how. I am suppose to have the computer print out the myName variable.

// On line 2, declare a variable myName and give it your name. var myName = “Manuel Castro-Bean”; // 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 51e2162452f8638ff6001298

0 votes

Permalink

I just resolved my own issue thank you for anyone that looks at it.

// On line 2, declare a variable myName and give it your name. var myName = “Manuel Castro-Bean”; // 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);

points
Submitted by CaptainBlak
almost 11 years