js find index in list

JavaScript
let myList = ['foo', 'bar', 'qux'];

myList.indexOf('bar');	// 1
Source

Also in JavaScript: