title: Get the index of the first element in an array with value greater than x
body: <p>I have this array:</p>
  
  <pre><code>var array = [400, 4000, 400, 400, 4000];
  </code></pre>
  
  <p>How can I get the index of the first element with value greater than 400?  </p>
  
  <p><strong>Note:</strong> While making sure this question was unique, I came across questions asking this same problem- but for different programming languages.<br>
  If there are duplicates of my question that apply to JS, I'd really want to see them.</p>