Thread: Variables
View Single Post
  #11  
Old 02-27-2002, 04:54 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by WHIPENIE4

Yes pwease
Variable arrays are an easy way to store multiple values to one variable:

this.variable={0,1,2,3,4,5}

The above sets the arrays for the variable 'this.variable'. To access the arrays you use:

if (this.variable[1]=value) {}

Roughly, that says, if the array 1 of this.variable is equal to a value the contents of {} occur.
Arrays start at 0. So the arrays for that variable would be:

this.variable[0]=0
this.variable[1]=1
this.variable[2]=2
And so on...
Reply With Quote