4/17 iterating over an array


I have no clue what's wrong.
Here's the code:
var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
for (var i = 0; i < languages.length; i++) {

The error is:
Oops, try again. It looks like you didn't log 'HTML' to the console!


You want to print items in the array that are from languages[0] to languages[4] (you have 5 items and the first position of an array is 0). Try fixing your for loop to iterate through the correct numbers and print


The way it is now it's just printing entireentire list without looping through


I had an issue where I was getting the same error even though I used console.log(languages[i]). I was able to resolve the issue by stripping the creative spin I put on my lesson but I thought it might be worth noting for future support cases.


Kudos on going the extra mile and putting "I would like to learn " + languages[x] + " next!" but that's why it's coming up wrong. Codecademy isn't reading that you logged HTML because it's reading the beginning of the string whiich is "I would like to". If you take that out it should come up fine.


After some fiddling, this worked:

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

for (var i = 0; i < languages.length; i++){


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