PDA

View Full Version : Arrays



clang232
12-17-2005, 02:26 PM
I'm having trouble with Array's, I just can't get them to work for me.


var mycars=new Array(3)


mycars[0]="Saab"
mycars[1]="Volvo"
mycars[2]="BMW"

document.write(mycars[0])


I wrote this down from the www.w3schools.com, and nothing shows up in the browser.

Chroder
01-19-2006, 12:09 AM
It should work just fine. What is the context you are using it in? That is, how in the HTML document is it being called etc.