MCPcopy Create free account
hub / github.com/angular/angular / arraySwap

Function arraySwap

packages/core/test/acceptance/integration_spec.ts:4017–4021  ·  view source on GitHub ↗
(arr: any[], indexA: number, indexB: number)

Source from the content-addressed store, hash-verified

4015}
4016
4017function arraySwap(arr: any[], indexA: number, indexB: number): void {
4018 const item = arr[indexA];
4019 arr[indexA] = arr[indexB];
4020 arr[indexB] = item;
4021}
4022
4023/**
4024 * Queries the provided `root` element for sub elements by the selector and casts the result as an

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected