Bracket notation error

in this exercise I am getting an error for “You should use bracket notation.” here’s my code var firstLetterOfLastName = "L"; var lastName = lastName[0];

Did you change the basic setup for this problem?

this is what I see on my end.

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

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

I would reset the lesson and only change code where you are supposed to

I only changed the second set, not the first one

this is what I have

Ohh I see.

You still need to reset the lesson.

You are not supposed to declare new variables.

Your task is to assign lastName[0] to firstLetterOfLastName.

Hope that makes sense!


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