Iterating over an array


#1

I don't understand why I keep getting the same error message: "Oops, try again. It looks like you didn't log 'HTML' to the console!"

Here's my code:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
for (var i=0; i < languages.length; i++) {
console.log(i);
}

Any suggestions?


#2

In the above you are logging the index, not the value at that index.

console.log(languages[i]);

#3

Thank you @mtf.
I had initially tried console.log(languages(i)); I know realize I used parentheses instead of brackets. Thanks!