2. error on code!


#1


This code says that it is wrong, but when I try it with the index number as a 3 it gives me a different error for the index number being wrong.

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
console.log=languages[2];

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

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


Replace this line with your code.


#2

Your console.log formatting is off.

console.log(log things here)


#3

The problem still happens regardless of if console.log is there or not.


#4

Could you show me what your updated code looks like? Thanks!


#5

I'm having the same issue and I've replaced the index with every position. none of them worked.

Here's my code:

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


#6

Disregard. I need to read instructions better. It tells you to display the result so I didn't include console.log. Once that was added in, it worked.

Working Code:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
console.log(languages[2]);


#7

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