LeetCode Records - Question 2619 Array Prototype Last
Array.prototype.last = function() {
return this.length === 0 ? -1 : this[this.length - 1];
};- Runtime: 39 ms (Beats: 97.58%)
- Memory: 48.59 MB (Beats: 68.14%)
Array.prototype.last = function() {
return this.length === 0 ? -1 : this[this.length - 1];
};