External: Array

Array

The built in string object.
Source:
See:

Methods

every(aCallback, aThisObject) → {boolean}

returns true if every element in this array satisfies the provided testing function. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aCallback external:Array~cbTest the function to test condition of the elements
aThisObject Object <optional>
the object that will be a global object ('this') in aCallback func.
Source:
Returns:
did all elements satisfy the condition?
Type
boolean

filter(aCallback, aThisObject) → {Array}

creates a new array with all of the elements of this array for which the provided filtering function returns true. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aCallback external:Array~cbTest the function to test all elements
aThisObject Object <optional>
the object that will be a global object ('this') in aCallback func.
Source:
Returns:
array that consisted of only adapted elements.
Type
Array

forEach(aCallback, aThisObject)

calls a function for each element in the array. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aCallback external:Array~cbIterate the function to exec for every element
aThisObject Object <optional>
the object that will be a global object ('this') in aCallback func.
Source:

indexOf(aSearchElement, aFromIndex) → {number}

returns the first index of an element within the array equal to the specified value, or -1 if none is found. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aSearchElement Object the item to search
aFromIndex number <optional>
index number to start searching
Source:
Returns:
index number
Type
number

lastIndexOf(aSearchElement, aFromIndex) → {number}

returns the last index of an element within the array equal to the specified value, or -1 if none is found. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aSearchElement Object the item to search
aFromIndex number <optional>
index number to start searching
Source:
Returns:
index number
Type
number

map(aCallback, aThisObject) → {Array}

creates a new array with the results of calling a provided function on every element in this array. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aCallback external:Array~cbIterate the function to exec for every element
aThisObject Object <optional>
the object that will be a global object ('this') in aCallback func.
Source:
Returns:
array that consisted of returned values.
Type
Array

some(aCallback, aThisObject) → {boolean}

returns true if at least one element in this array satisfies the provided testing function. (implement emulation of the method defined in JavaScript1.6)
Parameters:
Name Type Argument Description
aCallback external:Array~cbTest the function to test condition of the elements
aThisObject Object <optional>
the object that will be a global object ('this') in aCallback func.
Source:
Returns:
did some elements satisfy the condition?
Type
boolean

Type Definitions

cbIterate(anElement, anIndex, anArray) → {Object}

higher-order function for Array#forEach, {@link Array#map}
Parameters:
Name Type Description
anElement Object current processing element of the Array.
anIndex number current processing index-num of the Array.
anArray Array the Array itself.
Source:
Returns:
processing result value (any type) of this function
Type
Object

cbTest(anElement, anIndex, anArray) → {boolean}

higher-order function for Array#filter, {@link Array#some}, Array#every
Parameters:
Name Type Description
anElement Object current processing element of the Array.
anIndex number current processing index-num of the Array.
anArray Array the Array itself.
Source:
Returns:
processing result value (boolean) of this function
Type
boolean