Tell us what’s happening:
I don’t fully understand the purpose of lastNameLength = lastName;
in my code. I got it right, but why does the example and setup above not have lastNameLength = lastName;
?
Your code so far
// Example
var firstNameLength = 0;
var firstName = "Ada";
firstNameLength = firstName.length;
// Setup
var lastNameLength = 0;
var lastName = "Lovelace";
// Only change code below this line.
lastNameLength = lastName;
var lastName = "Octomomo";
var lastNameLength = 0;
lastNameLength = lastName.length;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string