Iterating over an array


I'm not sure what I've done wrong here. It states "Oops try again. It looks like you didn't log 'HTML' to the console!"

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


i in your code is just an index. To retrieve data from the array you have to use languages[i].


Ohh I understand, thank you so much.


You're very welcome.


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