find index of item in list js code example
Example 1: js find index in list
let myList = ['foo', 'bar', 'qux'];
myList.indexOf('bar'); // 1
Example 2: js get index of item in array
array.indexOf("item");
let myList = ['foo', 'bar', 'qux'];
myList.indexOf('bar'); // 1
array.indexOf("item");