List of utility methods to do Array First Item
first()Array.prototype.first = function () { return this[0]; }; | |
first()Array.prototype.first = function() { return this[0]; Array.prototype.last = function() { return this[this.length-1]; | |
first()Array.prototype.first = function() { return this[0]; | |
first()Array.prototype.first = function() { if (this.isEmpty()) { return null; return this[0]; }; | |
first()Array.prototype.first = function() { if (this.length == 0) return null return this.slice(0)[0] |