I think I've found a bug

When I add the .length property I get an error saying " You should not change the variable declarations in the // Setup section."

Now I’m pretty sure I didn’t modify anything in the //setup section.

help is greatly appreciated .

My code so far

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

// Only change code below this line

lastNameLength = lastName.length; 

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15

Challenge: Find the Length of a String

Link to the challenge:

You changed the starter code:

// Setup
let lastNameLength = 0;
const lastName = "Lovelace";

// Only change code below this line
lastNameLength = lastName;

I added lastNameLength = lastName.length;
under it but that didn’t seem to solve it either

You changed let and const to var, but that change is above the line that says // Only change code below this line, so the tests were not happy.

that’s interesting because every time I reset the code the first two lines we’re var.

After changing them to let and const it worked. I thought the reset means it’ll completely reset everything. Am I wrong ?

thanks for your help again

Those challenges haven’t had var for a while. Maybe you just have old browser cache?

1 Like

perhaps. Thanks a bunch