Basic JavaScript - Use Bracket Notation to Find the First Character in a String

Tell us what’s happening:
I have been trying to solve this since, kindly help e out.

Your code so far

// Setup
let firstLetterOfLastName = "";
const lastName = "Lovelace";

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

Your browser information:

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

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

Link to the challenge:

what have you tried changing this line to?

1 Like

@moyolade check this link String - JavaScript | MDN

On the left-hand side, you have all the methods you can use to manipulate the string. Try to find the appropriate one. It will probably be one that you have already studied in the curriculum.

If you cannot find it, you can always check the answer by clicking on Get Hint.

Actually, I did not read the question.

You should use bracket notation. The syntax is string[index] where index is the number of the letter you want to find. Indexes in JavaScript start at 0 (not 1).