@extra-array/middle
v2.10.19
Published
Gets values from middle.
Downloads
361
Readme
Gets values from middle. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
This is part of package extra-array.
array.middle(x, [i], [n]);
// x: an array
// i: start index (0)
// 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 ]