Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 664 Bytes

File metadata and controls

48 lines (27 loc) · 664 Bytes

arrays.pull

acc


export function pull *(array(array, values)*

Pull removes all of the given values from an array

Arguments

  1. array (T[]): input array
  2. values (...*): values to be removed from the array

Returns

(*): array of with values removed

Example

const result = arrays.pull([1, 2, 3, 4], 2, 4);
console.log(result)
> [1, 3]