12array and loop


#1



https://www.codecademy.com/courses/javascript-beginner-en-NhsaT/2/4?curriculum_id=506324b3a7dffd00020bf661#


I don't know


var names = ["Sal Khan","Steve","jobs","Arjun","Yeogirl"];

for(var i=0, i < names.length, i++) {
    console.log("I know someone called" + " " + names[i]);
}


#2

HI inside your for loop you should separate each statement with ; instead of ,


#3

I love you man I got it


#4

@ericentrepreneur,
the for-loop:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for

Reference

google search
== the Book ==
javascript [your question] site:developer.mozilla.org

== discussions / opinions ==
javascript [your question] site:stackoverflow.com

== guidance ==
www.crockford.com
http://javascript.crockford.com/code.html <---JavaScript code-convention
http://javascript.crockford.com/survey.html
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
www.developer.mozilla.org/en-US/docs/Web/JavaScript/Guide


#5

hello problem with my synthax, what's wrong ?

var noms = ["Giovanni", "Santos", "Daniel", "Anthony", "Manuel"];

for (var i = 5; i < noms.length; i ++) {
console.log ("Je connais quelqu'un appelé " noms[i]);
}


#6

@esla5,
you will have to use concatenation
like

console.log ("Je connais quelqu'un appelé " + noms[i]);

#7

doesn't work

var noms = ["Giovanni", "Santos", "Daniel", "Anthony", "Manuel"];

for (var i = 0; i < noms.length; i++); {
console.log ("Je connais quelqu'un appelé" + noms[i]);
}


#8

You have a semi-colon before the { which means it wont run whats below it, remove the semi-colon

if that doesn't work also add a space as leon said


#9

i found the problem thx for help me