var arr = new Array("js","JavaScript","jQuery");
var end = arr[arr.length-1]
console.log(end);//jQuery
[js] 获取数组最后一个元素
最新推荐文章于 2023-11-04 15:33:19 发布
var arr = new Array("js","JavaScript","jQuery");
var end = arr[arr.length-1]
console.log(end);//jQuery