Skip to content
wolfram77 edited this page Mar 26, 2020 · 20 revisions

Gets last value.

Alternatives: head, tail, init, last.

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

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

array.last([]);
// undefined

references

Clone this wiki locally