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