2. Access by Offset, I'm not doing anything wrong so what is happening?


#1


https://www.codecademy.com/courses/javascript-beginner-en-9Sgpi/0/2?curriculum_id=506324b3a7dffd00020bf661#

This is the easiest exercise but I'm getting an error. I'm positive that I did everything right but it says I didn't. The third element is printing to the console but it's saying I did it wrong. Maybe I'm just missing a parenthesis or something? Here is the error message:

Oops, try again. Make sure you log the third element of the languages array to the console.

Here is my code:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];

languages[2];

"Javascript" is printing to the console so what am I doing wrong?


#2

the codecademy console echoes the last value by default (this is not the case everywher), so the output looks good, but if the exercise explicitly mentions you need to log something to console, i would use console.log()


#3

That's so weird, thank you so much for your help I got it to work :slight_smile: