📅  最后修改于: 2022-03-11 15:02:37.949000             🧑  作者: Mango
// 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)