Skip to content

Remove an item from an array if you know its index.

Notifications You must be signed in to change notification settings

KevinFreistroffer/removeAt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

removeAt

Removes an item from an array based on index.

Install

$ npm install --save removeat

Usage

const removeAt = require('removeat');

let nums = [1,3,5,7,9];
let newNums = removeAt(nums, 2);
// => [1,3,7,9]

API

removeAt(array, index)

Returns the modified array.

array

Type: array

The array to modify.

index

Type: index

Position where to modify the array.

License

MIT © [Kevin Freistroffer]

About

Remove an item from an array if you know its index.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published