Here you can find the source of last()
// Extensions//from w ww . j a v a2 s . co m Array.prototype.last = function () { return this[this.length - 1]; };
Array.prototype.last = function() { return this[this.length-1]; }; Array.prototype.last = function() { return this[0]; };
Array.prototype.last = function() { return this[this.length - 1]; }; Array.prototype.flatten = function() { return this.reduce(function(a, b) { return a.concat(b); }); };
Array.prototype.last = function() { return this[this.length-1];
Array.prototype.last = function(){ if(this.length > 0) return this[this.length-1]; return null; };
Array.prototype.last = function() { if (this.length > 0) { return this[this.length - 1] };
Array.prototype.last = function () { return this[this.length - 1]; }; var Smart = Smart || {};
Array.prototype.last = function () { return this.pop(); };
Array.prototype.last = function() { if (this.length > 0) { return this[this.length - 1] };
Array.prototype.last = function() { if ( this.length === 0 ) { return; return this[ this.length - 1 ]; };