4.17 Not using var i? is it ok?


#1


Is it correct to use this code?


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

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


#2

@gigajumper25979,
Please read
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for

http://stackoverflow.com/questions/3010840/loop-through-an-array-in-javascript


#3

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