Cannot get my code to work


#1



Loops and Arrays II


Wont work and I do not understand why


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


#2

try not putting the = in at the: for (var i = 0; i < names.length; i ++) {

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


#3

@jacob.clark can you post a link to the exercise?


#4

I figured it out thank you everyone for the help it was the = sign


#5

please solution me! :grinning:


#6

firstly there is no semicolon after console.log and secondly you don't need to put a semicolon after the end braces.


#7

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