Help me with 12. loops and arrays II


var names ["Matthew","tyler","chelsey","dalton","noah"];

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

i've refreshed my page and browsed the forums and this looks right it keeps saying: error unexpected token [


It looks like you have to set the var names = to the array :slight_smile:

var names =  ["Matthew","tyler","chelsey","dalton","noah"];


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