swap Method

swap the values at indices i and j

swap(i: number, j: number): void

Parameter Type Description
i number first index
j number second index

Returns - void

Defined in

Last Updated: 30 November, 2023