My question is why does the correct answer for this challenge return a value of undefined when you test in in the console. im failing to wrap my head around that .I would appreciate an explanation for those willing to shed more light .Thanks
// Setup
var firstLetterOfLastName = “”;
var lastName = “Lovelace”;
// Only change code below this line
firstLetterOfLastName = lastName[0]; // Change this line
**Your browser information:**
User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36</code>
**Challenge:** Use Bracket Notation to Find the First Character in a String
**Link to the challenge:**
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string