@extra-array/drop
v2.10.19
Published
Discards first n values only.
Downloads
97
Readme
Discards first n values only. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Alternatives: drop, dropRight, dropWhile, dropWhileRight. Similar: take, drop.
This is part of package extra-array.
array.drop(x, [n]);
// x: an array
// n: number of values (1)
const array = require("extra-array");
var x = [1, 2, 3, 4, 5];
array.drop(x, 2);
// [ 3, 4, 5 ]
array.drop(x, 3);
// [ 4, 5 ]