26. Change variable values


#1

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


Replace this line with your code. 

// On line 2, declare a variable myName and give it your name.
var myName="Emina";
// 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);


#2

So what are you having an issue with?


#3

It doesn't work, I don't know why. I tried a lot of ways but still doesn't work


#4

How do you know it doesn't work? Could you tell us what happens when you run that code? Maybe there is an error message? Maybe there is some sort of output?


#5

I tried to go out and re-enter, now it works, I didn't know what was wrong. Anyway thank you for helping.


#6