Is this a bug in the system?

This (link)[Codecademy] to the Accessing Elements lesson.
The code belowe outputs the right saying on the terminal.

const famousSayings = ['Fortune favors the brave.', 'A joke is a very serious thing.', 'Where there is love there is life.'];

let listItem = [famousSayings[0]];

console.log(listItem);

However this error comes
Did you create a variable named listItem, and set it equal to an element from the famousSayings array?
I am confused.
screenshot provided

problem is I cannot move to the next lesson.

Hey,
you created a new array. But you just want to retrieve a single string from the array.

solution

Remove the outer brackets

ahh of course i see what you mean.
thank you

1 Like