📜  元素值的二维数组索引 - Javascript代码示例

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

代码示例1
let a = [ [ 'bird' ], [ 'cat' ], [ 'dog' ], [ 'cow' ], [ 'bird' ] ];
let b = _.findIndex(a, function(el) { return el[0] == 'cow'; });
console.log(b);//answer is 3