core3-utils

@wixc3/common on Github

Home > @wixc3/common > swap

swap() function

Swaps elements of an array in place

Signature:

export declare function swap<T>(array: T[], i: number, j: number): void;

Parameters

Parameter Type Description
array T\[\]
i number
j number

Returns:

void