-
Notifications
You must be signed in to change notification settings - Fork 5
middle
Subhajit Sahu edited this page Nov 20, 2022
·
19 revisions
Get values from middle.
function middle(x, i, n)
// x: an array
// i: start index
// n: number of values [1]
const array = require('extra-array');
var x = [1, 2, 3];
array.middle(x, 1, 1);
// → [ 2 ]
array.middle(x, 1, 2);
// → [ 2, 3 ]