var arr = new Array({"name": "wxx", "age": 2}, {"name": "wyw", "age": 6});var index = arr.findIndex(function(item) { return item.name "wyw";});console ...
var arr = new Array({"name": "wxx", "age": 2}, {"name": "wyw", "age": 6});
var index = arr.findIndex(function(item) {
return item.name === "wyw";
});
console.log(index);