We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Extracts given number of values from array. 🏃 📼 📦 🌔 📒
Alternatives: take, takeWhile. Similar: take, drop.
array.take(x, [n]); // x: an array // n: number of values (1)
const array = require('extra-array'); var x = [1, 2, 3, 4, 5]; array.take(x, 2); // [ 1, 2 ] array.take(x, 3); // [ 1, 2, 3 ]