I am stuck guys need help

I dont know where to put the letter[L]

Your code so far

// Setup
var firstLetterOfLastName;
var lastName = "Lovelace";

// Only change code below this line
firstLetterOfLastName = lastName[L];
// Change this line

Your browser information:

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

Challenge: Use Bracket Notation to Find the First Character in a String

Link to the challenge:

use indexing like [2]

This is what the example has:

var firstLetter = firstName[0];

This is what you have:

firstLetterOfLastName = lastName[L];

Unless “L” is the name of a variable with the correct index value, that isn’t going to work.

but u know what if l leave L its telling m to put L on firstlettername variable i really need help mayb l am not understanding something please assist me

Right, if I do this:

var firstLetter = firstName[];

it gives you this message:

The firstLetterOfLastName variable should have the value of L .

It is telling you that that variable (on the left side) should end up being equal to “L”. It is not telling you that you have to put “L” into the right side of the equation, just that the right side of the equation should evaluate to “L”. It wants you to do that by selecting the first character of that string (firstName). How do you do that? The example shows you. And MrBondx shows you too, but he’s targeting the 3rd character (remembering that with computers we start counting indexes with 0, or “zero-indexing”). So, you need to do like he and the instructions suggest, but for targeting the 1st character (remembering that we start counting indexes with 0).

Does that help?

Yeah I understand this will surely help …thanks

1 Like