Loops and arrays I what am I missing :(


#1

var cities = ["Melbourne", "Amman", "Helsinki", "NYC"];

for (var i = 0; i < cities.length; i++) {
console.log=("I would like to visit " + cities[i]);

}


#2

console.log shouldn't have an assignment =

Call it like this: console.log("Blah blah blah");


#3

thanks I changed that and its still not working


#4

console.log is not a function. (In 'console.log("I would like to visit " + cities[i])', 'console.log' is "I would like to visit undefined")

I get this


#5

Have you tried refreshing the page? Make sure you copy your code before you do so, in case it hasn't saved properly.