26/28


#1

// 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.
var myName = myName.substring(0, 2);
// On line 9, use console.log to print out the myName variable.
console.log("myName");

what is wrong?


#2

var myName = "Marc";
console.log(myName);
console.log(myName.substring(0,2));
console.log(myName);

compare that and you know what is wrong :smile:

sege


#3

You might want to revisit this one. The exercise is trying to get you to change the value of myName to be just the first 2 letters of your name. That console.log didn't change the value.


#4


#5

That's a lazy code checker there :smile:


#6

:smile: :smile: :smile:


#7

This was so helpful. I think I spent about a week figuring it out. I guess I didn't add the parentheses around that third line. thanks!