Skip to content

writetome51/array-remove-by-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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';

About

Removes single item from array, identified by a passed index

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published