4/17 What am I doing wrong?


#1

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

The above is my code, but it does not work and is telling me I did not log HTML to the console. Any suggestions???


#2

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

Sorry, this is the code I used.


#3

Got it. No need for an answer!


#4

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


#6

Hi, I'm Screenduck! Today I will try to solve this problem for you!

You were almost there! Only the for loop syntax was wrong. Take a look in the right code:

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

Hope this helped you. Keep waddling!
- Screenduck


#7

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

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

==============
my code was work! you can try it.


#8

Thanks . its working