Documentation
remove( array, item )
Removes the first occurrence of item
in array
from array
and returns true
if item
was
removed, or false
if it wasn't
Parameters
-
array {Array}: the array from which to remove the
item
-
item {Object}: the item to remove from
array
Returns
- {Boolean}:
true
if item was removed,false
otherwise
removeAll( array, item )
Removes all occurrences of item
in array
from array
and returns true
if at least one item was
removed, or false
otherwise.
Parameters
-
array {Array}: the array from which to remove the
item
-
item {Object}: the item to remove from
array
Returns
- {Boolean}:
true
if at least one item was removed,false
otherwise