Skip to content
wolfram77 edited this page Apr 13, 2020 · 24 revisions

Gets a part of array. 🏃 📼 📦 🌔

Alternatives: default, update.

array.slice$(x, [i], [I]);
// x: an array (updated)
// i: start index (0)
// I: end index (end)
// --> x
const array = require('extra-array');

var x = [1, 2, 3, 4, 5];
array.slice$(x, 2);
// [3, 4, 5]

x;
// [3, 4, 5]

var x = [1, 2, 3, 4, 5];
array.slice$(x, 2, 4);
// [3, 4]

references

Clone this wiki locally