function tail(array, n) {
        if (n === void 0) { n = 0; }
        return array[array.length - (1 + n)];
    }
Returns the last element of an array.
@param array The array.
@param n Which element from the end (default is zero).