Console.log() the third item in the newYearsResolutions array

I’m confused. The console has printed the 3rd item in the NYRs array… however, this exercise it’s signaled as if there was a mistake! any tips??


let newYearsResolutions = [“aprender a programar”, “escalar”, “enfadarte lo menos posible”];
let listItem = newYearsResolutions[0];
console.log (newYearsResolutions[2]);
console.log (newYearsResolutions[3]);

<do not remove the three backticks above>

try logging only the third item, not the fourth item. Also logging the fourth item, it might cause problem withh the exercise validition


However, it’s still not working for me…

with this code the exercise is still signaled as wrong… (logging the fourth item was an answer for the third exercise…)

let newYearsResolutions = ["aprender a programar", "escalar", "enfadarte lo menos posible"]; 
let listItem = newYearsResolutions[0];
console.log (newYearsResolutions[2]);

Thanks again!

There was a typo mistake! Problem solved, I had left an space before the ()
Thank u!

1 Like

i just spotted that by running your code, but better that you found it yourself :slight_smile:

i know, but its not always possible to do all steps of an exercise in one go


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