Skip to content
Subhajit Sahu edited this page May 19, 2020 · 15 revisions

Drops given number of values from array. 🏃 📼 📦 🌔 📒

Alternatives: take, takeWhile.
Similar: take, drop.

array.drop(x, [n]);
// x: an array
// n: number of values
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 ]

references

Clone this wiki locally