Methods
merge a function to merge a groups of values in one array(…args)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args | any | <repeatable> | any data type to merge in one array |
Returns:
Array of merged elements
removeDuplicates(array, toRemove)
A simple function to remove duplicated elements between two arrays
Parameters:
Name | Type | Description |
---|---|---|
array | Array | The original array |
toRemove | Array | the Array of elements to remove |
Returns:
New Array without duplicates element
removeFromArray a function to remove an element array(list, toRemove)
Parameters:
Name | Type | Description |
---|---|---|
list | array | the array to remove the element from it |
toRemove | any | any data type to remove |
Returns:
an Array of elements without removed value
removeTwins(array, toRemove)
A simple function to remove the element & it twins elements between two arrays
Parameters:
Name | Type | Description |
---|---|---|
array | Array | The original array |
toRemove | Array | the Array of elements to remove |
Returns:
New Array without duplicates element
toggleArrayValue function to add or remove a value from an array(arr, val) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
arr | Array | array to check value exists & make toggle |
val | String | | value to make toggle |
Returns:
new array after toggling
- Type:
- Array