how to find index of element in list js code example Example: js find index in list let myList = ['foo', 'bar', 'qux']; myList.indexOf('bar'); // 1