Returns a new array with the last count elements removed. Returns an empty array if count is not an integer or is negative.
count
import * as A from "flurp/array";const withoutLastThree = A.dropLast(3);withoutLastThree([10, 20, 30, 40, 50]); // [10, 20]withoutLastThree([10, 20]); // []
Returns a new array with the last
count
elements removed. Returns an empty array ifcount
is not an integer or is negative.Example