Start of main content
Array without last element
JavaScript, Array · Nov 3, 2020

Returns all the elements of an array except the last one.
const initial = arr => arr.slice(0, -1);
initial([1, 2, 3]);
More like this

Array destructuring can be leveraged in many different ways. Here's one of them.
JavaScript, Array · Aug 28, 2022

Learn how to execute a function for each element of an array, starting from the last one.
JavaScript, Array · Oct 10, 2023

Creates an array of elements, ungrouping the elements in an array produced by zip and applying the provided function.
JavaScript, Array · Jan 23, 2022