// Example
var firstNameLength = 0;
var firstName = "Ada";
firstNameLength = firstName.length;
// Setup
var lastNameLength = 0;
var lastName = "Lovelace";
// Only change code below this line.
var lastName='RenoMorr';
lastNameLength = lastName;
lastNameLength.length;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.
Hi camper , why you changed lasteName to another value , and in the test they don’t say to you do that ,
you have to let it as it is , what you should do is to count the length of it , the length retuns the number of how much letters they are in the string ex:
let str="Hello";
let howMuch=str.length;\\ expected output is 5 because it starts counting from 1 ,it is one based index
let resutlt=howMuch; \\here I assigned the variable howMuch to result so result have now value **5** in it ;
It is mind boggling for me to even grasp what is needed…I did lessons before fast…but this one i cant grasp the concept…
This .length command…
I just dont get it if you can see that the name is lets say 8 characters…why you need to display it?
THe result should be 8…should I use var and use name with 8 characters?
So in the example on that page
// Example
var firstNameLength = 0;
var firstName = “Ada”;
firstNameLength = firstName.length;
result is 3? firstNameLength is = to the number of characters in the name ADA
But above line var firstNameLength = 0; completely destroys my logic…it is set to 0 so how can it be 3 later on?