Skip to content
Subhajit Sahu edited this page May 3, 2023 · 17 revisions

Get values except last.

Similar: head, tail, init, last.


function init(x)
// x: an array
const xarray = require('extra-array');

xarray.init([1, 2, 3]);
// → [ 1, 2 ]

xarray.init([1]);
// → []


References

Clone this wiki locally