Skip to content
Subhajit Sahu edited this page Feb 3, 2021 · 18 revisions

Get values except last.

Similar: head, tail, init, last.


function init(x)
// x: an iterable
const xiterable = require('extra-iterable');

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

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


References

Clone this wiki locally