Skip to content
Subhajit Sahu edited this page Mar 14, 2020 · 21 revisions

Gets first value.

array.head(x);
// x: an array
// --> first value
const array = require('extra-array');

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

array.head([]);
// undefined

references

Clone this wiki locally