// Example
var firstNameLength = 0;
var firstName = "Ada";
firstNameLength = firstName.length;
// Setup
var lastNameLength = 0;
var lastName = "Lovelace";
// Only change code below this line.
lastName.length; //8
lastNameLength = lastName;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 OPR/62.0.3331.99.
we need to add
Use the .length property to count the number of characters in the lastName variable and assign it to lastNameLength .
so first we put
lastNameLength on a new line
lastNameLength
then just like with myName in one of the previouse lesson we add a =
lastNameLength =
then as we read the instruction: For example, if we created a variable var firstName = "Charles" , we could find out how long the string "Charles" is by using the firstName.length property.
so the last part becomes lastName.lenght
then we of course close of with a ;