|
CORE
NATIVE
TABLE
MAKE
CUSTOMIZE
EFFECTS
effects_base.js
effects_morph.js
effects_fade.js
effects_move.js
effects_extra.js
effects_toggle.js
effects_cycle.js
effects_cycles.js
VIRTUAL BOX
PLUG-IN
|
array.js
Contains prototypes which extend the Array constructor Contains Class Array, Function print_r Requires Summary
Extends the native Array object with many methods that aren't contained in the core Javascript language and allows you toexecute many useful functionalities with the target array or with its items.It also contains a function called print_r, that works as the PHP print_r function. Extends Class Array Methods
top method print_r prints all array elements and nested array like the PHP print_r function
Arguments
Example var a = ['a', 'b', 'c', ['d', 'e', 10]]; a.print_r('box'); // returns Array ( [0] => 'a' [1] => 'b' [2] => 'c' [3] => Array ( [0] => 'd' [1] => 'e' [2] => 10 ) ) top method numSort orders the array elements (asc)
Example var a = [44, 68, 32]; // returns [32, 44, 68] a.numSort(); top method rNumSort orders the array elements (desc)
Example var a = [44, 68, 32]; // returns [68, 44, 32] a.rNumSort(); top method getFirst returns the first item of the array
Example var a = [44, 68, 32]; // returns 44 a.getFirst(); top method getLast returns the last item of the array
Example var a = [44, 68, 32]; // returns 32 a.getLast(); top method asItem tests if the array contains the passed in item
Arguments
Example var a = [44, 68, 32]; // returns true a.asItem(44); top method asItems tests if the array contains all the passed in items
Arguments
Example var a = [44, 68, 32]; // returns true a.asItems(44, 32); top method stripItem removes the passed in item from the array
Arguments
Example var a = [44, 68, 32]; // returns [68, 32] a.stripItem(44); top method stripItems removes all the passed in items from the array
Arguments
Example var a = [44, 68, 32]; // returns [32] a.stripItems(44, 68); top method posOf returns an array which represents the positions of all the occurences of the passed in item
Arguments
Example var a = [44, 68, 32, 44]; // returns [0, 3] a.posOf(44); top function print_r prints all array elements like the PHP print_r function
Arguments
Example var a = ['a', 'b', 'c', ['d', 'e', 10]]; print_r(a, 'box'); // returns Array ( [0] => 'a' [1] => 'b' [2] => 'c' [3] => Array ( [0] => 'd' [1] => 'e' [2] => 10 ) )
Documentation By
Riccardo Degni -
powered by MakeDocs, CMS by RD |