📅  最后修改于: 2022-03-11 15:01:13.330000             🧑  作者: Mango
const a = [
{ firstName: "Adam", LastName: "Howard" },
{ firstName: "Ben", LastName: "Skeet" },
{ firstName: "Joseph", LastName: "Skeet" }];
let index = a.findIndex(x => x.LastName === "Skeet");
console.log(index);