Array.prototype.indexof(value):得到值在数组中的第一个下标
Array.prototype.lastIndexof(value):得到值在数组中的最后一个下标
Array.prototype.foreach(function(item,index){}):遍历数组
Array.prototype.map(function(item,index){}):遍历数组返回一个加工之后的数组,返回加工之后的值
Array.prototype.filter(function(item,index){}):遍历过滤一个新的数组,返回条件为true的值
例子:
原文:https://www.cnblogs.com/maycpou/p/12321271.html