7 lines
No EOL
125 B
JavaScript
7 lines
No EOL
125 B
JavaScript
Array.prototype.first = function() {
|
|
return this[0];
|
|
}
|
|
|
|
Array.prototype.last = function() {
|
|
return this[this.length-1];
|
|
} |