Basic JavaScript - Find the Length of a 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
lastNameLength = 8;
let length="lovelace";
length = lastName.length;

Your browser information:

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

Challenge: Basic JavaScript - Find the Length of a String

Link to the challenge:

You have to get length of lastName in lastNameLength. Don’t create another variable, you have to change only third line of your code,
for example;

let name = 0;
const lastName = "Ron";
name = lastName.length;

I have set lastName length to name in upper code.

1 Like

amazing job
hrhehrhrhrhhrrhhrhr

im literrely 9 im learning to code as a beginer

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