Skip to content
Subhajit Sahu edited this page Jun 17, 2020 · 15 revisions

Removes first n entries. 🏃 [:vhs:] 📦 🌔 📒

Alternatives: drop, drop$.
Similar: take, drop.

entries.drop(x, [n]);
// x: entries
// n: number of entries (1)
const entries = require('extra-entries');

var x = [['a', 1], ['b', 2], ['c', 3], ['d', 4], ['e', 5]];
[...entries.drop(x, 2)];
// [ [ 'c', 3 ], [ 'd', 4 ], [ 'e', 5 ] ]

[...entries.drop(x, 3)];
// [ [ 'd', 4 ], [ 'e', 5 ] ]

references

Clone this wiki locally