4. Iterating over an array


#1


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


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


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

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

how do i log HTML to the console???


#2

instead say var i = 0. If you start at 4 then it is only going to log Ruby to the console because your basically saying start at 4 and log anything to the console after that.


#3

Thank you so much! I'll go do that right now!


#4

np, I'm glad to help :slight_smile:


#5

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