-
Notifications
You must be signed in to change notification settings - Fork 5
slice
wolfram77 edited this page Mar 26, 2020
·
18 revisions
Gets a part of array.
array.slice(x, [i], [I]);
// x: an array
// i: start index (0)
// I: end index (end)
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]