Skip to content
wolfram77 edited this page Mar 27, 2020 · 19 revisions

Gets last value.

Similar: head, tail, init, last.

iterable.last(x);
// x: an iterable
const iterable = require('extra-iterable');

iterable.last([1, 2, 3]);
// 3

iterable.last([]);
// undefined

references

Clone this wiki locally