Skip to content

first

Get the first item in an array or a default value.

Usage

first([1, 2, 3, 4]);
// 1
first([], 0);
// 0

Installation

Terminal window
npx atmx add helper first