js 数组 通过索引找元素并返回该元素
1 回答

元芳怎么了
TA贡献1798条经验 获得超7个赞
Array.prototype.itemOf = function(index) {
for (var i = 0; i < this.length; i++)
{
if (i === index) { return this[i]; }
}
return -1;
};
没有找到匹配的内容?试试慕课网站内搜索吧
添加回答
举报
0/150
提交
取消