Tell us what’s happening:
Not sure what’s going wrong. I am getting the value of 8 in the console like it states.
This is the code after everything is reset.
Your code so far
// Setup
let lastNameLength = 0;
const lastName = "Lovelace";
// Only change code below this line
lastNameLength = lastName;
Heres the code after edit
// Setup
let lastNameLength = 0;
const lastName = "Lovelace";
// Only change code below this line
lastNameLength = lastName;
console.log(lastName.length)```
> // running tests
lastNameLength
should be equal to eight. You should be getting the length of
lastName
by using
.length
like this:
lastName.length
. // tests completed // console output 8 8
**Challenge:** Basic JavaScript - Find the Length of a String
**Link to the challenge:**
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string