Querry with javascript

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

Bracketing notation is not work very well.

Your code so far


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

// Only change code below this line
const firstLetter = lastName[0]; // 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/99.0.4844.82 Safari/537.36

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

Link to the challenge:

Bracketing notation is not work very well.

The bracketing notation is working fine. The issue is that you tried to redeclare the variable with const. It was already declared with let up above. You also changed the code up above, in the setup the comment tells you not to do that, only change the last line.

When I remove that redeclaration, it works for me.

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