javaScript Find the Length of a String it's resolve but it doesn't pass

Tell us what’s happening:
Describe your issue in detail here.
Hi i think i resolved the code issues but it doesn’t go through and i don’t understand what to do.

Your code so far

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

// Only change code below this line
lastNameLength = 8;
console.log(lastName.length);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge: Find the Length of a String

Link to the challenge:

1 Like

You’re giving it a value of 8 which is the output we want, but what if there’s more than 8 letter in the lastName variable?

You need to assign the length of the lastName variable to the lastNameLength variable. And to do that, you need to access the length using the .length property.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.