Nodejs Utililty Methods Array Except Last

List of utility methods to do Array Except Last

Description

The list of methods to do Array Except Last are organized into topic(s).

Method

exceptLast()
Array.prototype.exceptLast = function() {
    if (this.length <= 1) return null
    return this.slice(0, this.length - 1)