push()
push<
T
>(arr
): (x
) =>T
[]
Returns a new array with the given value added to the end.
Type Parameters
• T
Parameters
arr
T
[]
The array to add an item to.
Returns
Function
Parameters
x
T
Returns
T
[]
Remarks
pure function
Example
import { push } from '@accelint/core';
push([1, 2, 3, 4])(5);
// [1, 2, 3, 4, 5]