how to find index of an element javascript code example Example: js get index of item in array array.indexOf("item");