Use Bracket Notation to Find the First Character in a String

Tell us what’s happening:

Your code so far

// Example
var firstLetterOfFirstName = "";
var firstName = "Ada";

firstLetterOfFirstName = firstName[0];

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

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

Your browser information:

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

Link to the challenge:

you didn’t use brackets.

firstLetterOfLastName = lastName;

firstLetterOfLastName = lastName[0];

1 Like

I forgot them too.

firstLetterOfLastName = lastName[];

did’t read the need to add a 0 because the counting start at the 0 the 0 base index thingy