JavaScript数组取最后一个元素

637 阅读1分钟
// index取值
args[args.length - 1]

// pop方法
args.pop()
// 注意: pop方法会删除args最后一个元素,并返回