@writetome51/array-remove-by-index
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

removeByIndex(index, array): void

Removes item, identified by index, from array.
index can be negative or positive.

Examples:

let arr = [1,2,3,4,5,6];
removeByIndex(2, arr); // arr is now [1,2,4,5,6]

arr = [1,2,3,4,5,6];
removeByIndex(-2, arr); // arr is now [1,2,3,4,6]

Installation

npm i @writetome51/array-remove-by-index

Loading

import {removeByIndex} from '@writetome51/array-remove-by-index';

Package Sidebar

Install

npm i @writetome51/array-remove-by-index

Weekly Downloads

4

Version

2.0.1

License

MIT

Unpacked Size

2.56 kB

Total Files

5

Last publish

Collaborators

  • writetome51