Stuck on lesson 26


#1

https://www.codecademy.com/courses/getting-started-v2/4/3?curriculum_id=506324b3a7dffd00020bf661#

"Oops, try again. It looks like you didn't log your whole name to the console."


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


#2

Remove the equal sign and don't space the argument inside the parentheses it should just be (MyName) .


#3

It says another error message : "Oops, try again. Your code doesn't look quite right. Check the Hint if you need help!" @


#4

The second console.log statement should be a substring of Nemo meaning,

console.log(myName.substring(0, 2));

Would print out Ne instead of Nemo.

So here just write Nemo in the quotation marks


#6

Thank you, I finally managed to get the code right :smile:


#7

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