title: How to use IndexOf for a range of values
body: <pre><code>var Myarray = [0,4,6,14,50]
  
  var Index = Myarray.indexOf(40-50)
  </code></pre>
  <p>How do I write this in p5, where it returns the index of all the numbers inside a specific range?</p>
  <p>Mistakes I could have made</p>
  <ol>
  <li>I may be using indexOf, which is the wrong command</li>
  <li>I may not know the full extent of how indexOf works</li>
  <li>If there isn't a command, is it possible to use a for loop</li>
  </ol>
  <p>Note: The 40-50 isn't meant to be from any specific language, it's just to show what I'm going for.</p>