Object Summary
Prototype add-ons to the builtin Array object.
Currently, only basic methods are included in it.
We're planning to make new additions to the object in latter releases.
Note that the methods of Array below are supported by all modern browsers. So we did not include wrappers for them.
- .concat()
- .pop()
- .push()
- .shift()
- .slice()]
- .splice(
- .unshift()
Methods
Array.indexOf(elm)
parameters
elm - The element to seek its index.
returns
The first occurrence of elm, -1 if there is no match.
comments
Returns the index of the first occurrence of elm in the array.
Array.contains(elm)
parameters
elm - The element to check.
returns
true if the array contains elm, false otherwise.
comments
Checks whether or not the Array contains elm.
returns
A copy of the original array.
comments
Copies the contents of an array and returns it.
If any element of the array is copyable (i.e. it is an Array or
has a copy method available) those elements are copied as well.
Otherwise primitive members (strings,numbers) ar copied but
objects (functions,associative arrays,vendor-specific objects etc.)
are passed by ref.
comments
Removes all the contents of the Array. The new length of the Array becomes zero.
returns
The first element of the Array.
comments
returns
The last element of the Array.
comments
See Also
EventRegistry
Preloader
Usage Examples
Comments (0)
You don't have permission to comment on this page.