doc: clarify Array#first and Array#last [#295 state:resolved]

This commit is contained in:
tjcrowder 2009-09-07 12:16:20 +01:00 committed by Tobie Langel
parent 53317eae50
commit 7fcd513364

View File

@ -149,7 +149,8 @@ Array.from = $A;
/**
* Array#first() -> ?
* Returns the array's first item.
*
* Returns the array's first item (e.g., `array[0]`).
**/
function first() {
return this[0];
@ -157,7 +158,8 @@ Array.from = $A;
/**
* Array#last() -> ?
* Returns the array's last item.
*
* Returns the array's last item (e.g., `array[array.length - 1]`).
**/
function last() {
return this[this.length - 1];