Search
⌘K

Leetcode 2619. Array Prototype Last

Add an Array.prototype.last() method that returns the last element of any array (arrays may contain any JSON values) and returns -1 when the array is empty.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.