findindex in list javascript code example
Example 1: js find index in list
let myList = ['foo', 'bar', 'qux'];
myList.indexOf('bar'); // 1
Example 2: .findIndex(
array.findIndex(call back function)
//index of ............
//first
let myList = ['foo', 'bar', 'qux'];
myList.indexOf('bar'); // 1
array.findIndex(call back function)
//index of ............
//first