I am having issue getting the length of the string

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

// Setup
let lastNameLength =0;
const lastName = "Lovelace";

// Only change code below this line
let lastNameLength =8;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36

Challenge: Find the Length of a String

Link to the challenge:

When you declare a variable you don’t need to do it a second time, they also ask you to assign to the variable “lastNameLength” the amount of characters of the variable “lastName” using the length tool.

dont redeclare variable. just override it with same name variable. and u need to use .length to check the length of the given text,

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.