Iterating Over an Array


For some reason I am not able to log the elements of the array. The error msg tells me that I am missing "html".

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

for (var i=0; i< languages.length; i++){
    console.log [(i)];


Hi what do you want to do with [(i)] ? you just need to pass the i inside the console.log



when i type console.log (i);

I don't get the elements in the array, I get numerals; think it's printing the numerical value of i during each iteration.


If you want to print them put that inside the console.log



Thanks. I forgot the "languages" so I was merely printing i. Spacey.


Here is my code:

AND the log which clearly shows HTML; BUT, I get this message: Oops, try again. It looks like you didn't log 'HTML' to the console!

What to do now?


Hi instead of 5 you should put languages.length then inside your `console.log() you should put languages[i]


Thank you! I also removed the ; after my for statement.