Array functions

Functions to add, get and remove items from arrays.

Ar­ray.­con­c­at(list)
Concat two arrays into one.
Ar­ray­.eve­r­y(callback)
Calls a function for every item in an array, stops when return result is false.
Ar­ray.­fil­t­er(filter)
Returns the items in an array that matches the filter function.
Ar­ray.­fin­d(filter)
Returns first item that mathces the specified filter function.
Ar­ray.­for­Eac­h(callback)
Iterates all items in the array and executes a function passing the array item as a parameter.
Ar­ray.g­ro­up­By(key)
Groups the items in an array based on the specified property name or function.
Ar­ray­.in­de­xO­f(item)
Finds and returns index of specified item in an array.
Ar­ray.­joi­n(seperator)
Joins all elemnts in an array into a string
Ar­ray.­len­gt­h
Returns the number of elements in an array.
Ar­ray.­pop
The pop() method removes the last element from an array and returns that element. This method changes the length of the array.
Ar­ray.­pus­h(item)
Adds an item to the array (at the end) you are calling the method from.
Ar­ray.­rev­er­se
The reverse() method reverses an array in place and returns the reference to the same array.
Ar­ray.s­hi­ft
The shift() method removes the first element from an array and returns that element. This method changes the length of the array.
Ar­ray.s­li­ce(start, end)
Returns a new array of a part of the array. Does not modify the existing array.
Ar­ray.­som­e(evaluator)
Tests whether at least one element in the array returns true with provided evaluator function.
Ar­ray.­sor­t(sorter)
Sorts the specified array (modifying the array that the sort method is called from).
Ar­ray.sp­l­ice(start, deleteCount, item1...N)
Changes the contents of an array by removing or replacing existing elements and/or adding new elements at specified index.