Tell us what’s happening:
The output is 8, but its still marked as an error. any help?
Your code so far
var lastNameLength = 0;
var lastName = "Lovelace";
// Only change code below this line
lastNameLength = 8;
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/14.0.2 Safari/605.1.15
Challenge: Find the Length of a String
Link to the challenge:
Hi @GoodNGo !
You are not supposed to hard code the number 8 here.
The goal of the challenge is to use the length property.
You are supposed to assign the length of lastName to lastNameLength.
Take this part
and assign it to the variable
var firstLetterOfLastName = "L"; var lastName = lastName;
Whenever you have a new challenge you should always open up a new topic using the Ask for help button.
It is bad practice on the forum to have multiple challenge discussions in the same topic.
Since the topic is about Find the Length of a String, it is best not to add in other challenges into this discussion.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.