return n === undefined ? array[0] : array.slice(0, n);