Underscore.js _.indexOf() Function
Underscore.js _.indexOf() gives the index of the element whose position we need to find. It starts to count the position of the elements in the array from 0. If the element is not present in the array then the result will be -1. Syntax: _.indexOf(array, value, [isSorted]);Parameters:array: It is the array, in which we want to find out the index of