Is there a problem with Question 25 -- Change Variables?


#1

Here is my code.

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

I have run it through the console on Chrome it does what it is supposed to do. Here are the results from the Chrome console.

Regex

.
// On line 2, declare a variable myName and give it your name.
var myName = "Kim Thompson";
// 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);
VM105:5 Kim Thompson
VM105:10 Ki
undefined

As you can see it prints out what it's supposed to and yet the answer to the problem is still coming up wrong. Is it something I'm doing wrong or is it an issue with the program on Codecademy?


#2

Sounds like an issue with Codecademy. Try refreshing the page or temporarily using a different browser.