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

plis help! I’m stuck here for hours.
it keeps on saying that i should the bracket notation. i checked other similar questions that were already answered on the forum but still i cant figure it out

// Setup
let firstLetterOfLastName = "";
const lastName = "Lovelace";
const firstLetter = lastName[0];

// Only change code below this line
firstLetterOfLastName = "L"; // 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/106.0.0.0 Safari/537.36

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

Link to the challenge:

Does this look like bracket notation to you? Look at the example in the challenge where bracket notation is used.

the instruction was to use the bracket notation to find the first character in the lastName variable and assign it to firstLetterOfLastName. so the first character in lastName is L. I tried to put brackets around L and its saying undefined

What is this part you added do?

It was to find the first character of the variable as the instruction said. i copied the example below. I just cant see where it went wrong
const firstName = “Charles”;
const firstLetter = firstName[0];


`firstLetter` would have a value of the string `C`.

In the code you posted (shown below):

let firstLetterOfLastName = "";
const lastName = "Lovelace";
const firstLetter = lastName[0];

What value does firstLetter have when the code executes?

Thanks a lot for your response. I solved it

firstLetterOfLastName = lastName[0];
this was the correct code. this is where i was wrong