Associative Arrays part 2

Associative Arrays



Remember that JavaScript does not support arrays with named indexes.
In JavaScript, arrays always use numbered indexes.
It is better to use an object when you want the index to be a string (text).
Use an array when you want the index to be a number.
If you use a named index, JavaScript will redefine the array to a standard object.

Comments

Popular posts from this blog

String Operators

Introducing object part 3

The math object part 2