Skip to content
Subhajit Sahu edited this page Feb 3, 2021 · 12 revisions

Removes first n entries. 📦 😺 🏃 📼 🌔 📜 📰 📘

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


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

var x = new Map([["a", 1], ["b", 2], ["c", 3], ["d", 4], ["e", 5]]);
map.drop(x, 2);
// Map(3) { "c" => 3, "d" => 4, "e" => 5 }

map.drop(x, 3);
// Map(2) { "d" => 4, "e" => 5 }


References

Clone this wiki locally