Answers for "2 dimensional array index of element value"

0

2 dimensional array index of element value

let a = [ [ 'bird' ], [ 'cat' ], [ 'dog' ], [ 'cow' ], [ 'bird' ] ];
let b = _.findIndex(a, function(el) { return el[0] == 'cow'; });
console.log(b);//answer is 3
Posted by: Guest on January-06-2021

Code answers related to "2 dimensional array index of element value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language