Basic JavaScript - Find the Length of a String

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

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

// Only change code below this line
lastNameLength = lastName;
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/16.5.2 Safari/605.1.15

Challenge Information:

Basic JavaScript - Find the Length of a String

Hello @ivashishth0 !

Good attempt.

No need to add the lastName again.

Just add the .length to the end of the existing lastName and see what happens.

Happy coding!

3 Likes

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