Skip to content

last

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

Usage

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

Installation

Terminal window
npx atmx add helper last