last :: Array

last() -> value

 

Returns the last item in the array, or undefined if the array is empty.

 

Example

 

['Ruby''Php''Python'].last()

// -> 'Python'

 

[].last()

// -> undefined


Prototype API 1.5.0 - prototypejs.org