Look at this line here: console.log("lastName".length);
Why did you but the name of the variable in quotes?
And this line: lastNameLength = lastName;
This is the line that you want to change. Currently, it is setting lastNameLength to equal “Lovelace”. Take a look at the explanation on the left side of the exercise to see how to find the length of a string called firstName.
For example, if we created a variable const variableName = "Ada" ,
we could find out how long the string Ada is by using the variableName.length
property.
// Setup
let lastNameLength = 0;
const lastName = "Lovelace";
// Only change code below this line
lastNameLength = lastName;
console.log(lastNameLength.length);
I've done this and the result is 8 but it seems to be incorrect
Now you have output the correct answer to the console, but you need to assign that value to the lastNameLength variable. Put what you entered into console.log(...) after lastNameLength = .