FIT100
Arrays and Indexes
We know about names with multiple instances: Rocky 3, QE 2, John Paul 2
•The number is called the name’s index
•The least index is called the index origin
•In programming, variables that can be indexed are called arrays
•Declare arrays in JavaScript:
•var <identifier> = new Array (<num elements>);
•JavaScript arrays are 0-origin
•Reference array elements w/ brackets: A[0]