Need Help for Understading this code

Tell us what’s happening:
Describe your issue in detail here.
I can’t understand how to do that?

Your code so far


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

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

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

Link to the challenge:

HI @preetyparamanick1999 !

Welcome to the forum!

It looks like you changed the starter code.
I would reset the lesson.

Your starter code should look like this.

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

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

Make sure to only change code where it says to

Then your task is to get the first letter of the lastName variable using bracket notiation.
In your code it looks like you are trying to access the first letter of the firstLetterOfLastName variable which is incorrect.

Make sure to work with the correct variable to get the test to pass.

Hope that helps!

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

Your code so far


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

// Only change code below this line
firstLetterOfLastName = console.log(lastName[0]);// Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

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

Link to the challenge:

you don’t need to console log this , just assign the value(first letter of lastName)
.

Thank You so much.
// Setup
let firstLetterOfLastName = “”;
const lastName = “Lovelace”;

// Only change code below this line
firstLetterOfLastName = “L”;
firstLetterOfLastName=lastName[0]; // Change this line