I don't understand why this isn't working?


#1

var eddieMurphy = "i can't wait till i learn this completely"
var halieBerry = "so close i can almost taste it."
var array1= [eddieMurphy,halieBerry, 23,24]
for (i=0;i<=array1.length;i++){
console.log("my thoughts" + array1(i))
};

i know theres a link or another page with exactly what i need to know. but i can't seem to find it.


#2

You need semicolons ; after every statement.


#3

nope brackets but thank you


#4

What is the error message you receive? Using <= here i<=array1.length isn't that good rather use < because arrays start counting at 0 so there are array.length entries but array[array.length] is not existing. This might not be your problem but it doesn't harm to fix it.