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


#1

https://www.codecademy.com/courses/learn-javascript-arrays/lessons/arrays/exercises/property-access?action=lesson_resume&course_redirect=introduction-to-javascript

Hello!
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(listItem);
console.log (newYearsResolutions[2]);
console.log (newYearsResolutions[3]);

<do not remove the three backticks above>

#2

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


#3

Thanks,
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(listItem); 
console.log (newYearsResolutions[2]);

Thanks again!


#4

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


#5

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


#6

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