I can't solved this problem

I can't solved this problem
0

#1

Tell us what’s happening:

Your code so far

// Example
var firstNameLength = 0;
var firstName = "Ada";

firstNameLength = lastName.length;

// Setup
var lastNameLength = 0;
var lastName = "Lovelace";

// Only change code below this line.

lastNameLength = lastName.length;



Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:



#2

Problem is solved. Thanks all.


#3

The challenge starts off with the following code:

// Example
var firstNameLength = 0;
var firstName = "Ada";

firstNameLength = firstName.length;

// Setup
var lastNameLength = 0;
var lastName = "Lovelace";

// Only change code below this line.

lastNameLength = lastName;

Though the last line in your solution is correct, you seemed to have changed the following line in the original solution code from:

firstNameLength = firstName.length;

to

firstNameLength = lastName.length;

The reference to lastName is undefined, because the lastName variable is not assigned the value “Lovelace” until two lines later.


#4

Thanks. problem solved.