title: Is there an indexOf in javascript to search an array with custom compare function
body: <p>I need the <em>index</em> of the first value in the array, that matches a custom compare function.</p>
  
  <p>The very nice <a href="http://underscorejs.org/#find" rel="noreferrer">underscorej</a> has a "find" function that returns the first value where a function returns true, but I would need this that returns the index instead. Is there a version of indexOf available somewhere, where I can pass a function used to comparing?</p>
  
  <p>Thanks for any suggestions!</p>