📜  javascrpt 查找索引 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:02.445000             🧑  作者: Mango

代码示例1
const numbers = [2, 4, 5, 3, 8, 9, 11, 33, 44];
const findIndex = numbers.findIndex((number) => number == 5);
console.log(findIndex)
//Expected output: 2