Array.prototype.last = function():*{ return this[this.length-1]; } var a = new Array(1, 2, 3, 4, 5); trace(a.last());