We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Gets a part of array. 📦 😺 🏃 📼 🌔 📜 📰 📘
Alternatives: slice, slice$.
array.slice(x, [i], [I]); // x: an array // i: start index (0) // I: end index (X)
const array = require("extra-array"); var x = [1, 2, 3, 4, 5]; array.slice(x, 2); // [ 3, 4, 5 ] array.slice(x, 2, 4); // [ 3, 4 ] array.slice(x, -3, -1); // [ 3, 4 ]