first

first() -> value

返回数组中第一个元素,若数组为空,返回 undefined

样例

['Ruby', 'Php', 'Python'].first()
// -> 'Ruby' 
[].first()
// -> undefined