📜  在数组 javascript 代码示例中查找索引

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

代码示例3
// find index of array in javascript
const number = [1,6,2,8,1,0,4,2,7,5,4,1];
const index = number.findIndex(item => item === 8);
console.log(index)