Basic JavaScript - Find the Length of a String

Although i wrote the right cdde like this:
console.log(lastName.length), and the answer is 8. i could go forward with the next lessons.
Help please!


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

// Only change code below this line


lastNameLength = lastName;

lastName.length
console.log(lastNameLength.length)



Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Find the Length of a String

Link to the challenge:

Welcome to our community!

The length property should be applied on the ‘lastName’ variable, that value should be assigned to the ‘lastNameLength’, and then, the ‘lastNameLength’ should be print in the console:

longNameVar = shortNameVar.property
console.log(longNameVar)

This is guidance.

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