12 loops and arrays


var names = ["andy", "ben", "sam","tim","amanda"];

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

anyone kind can help with this .......
this drives me crazy
i don't know what is wrong


This looks like javaScript not Python and what is wrong with it? What is the error message? From first glance it seems to be ok maybe you just need to refresh the page or read the instruction carefully.



If using javascript , you should close the for-loop-condition with a closing-parentheses-)

 for (var i = 0; i < names.length; i++) {

If using python

var names = ["andy", "ben", "sam","tim","amanda"];

for key in names:
    print "I know someone called" +" " + key


i practice the java script and python the same time so might confuse sometime. :joy:
Thank you for the help!