title: Find the indices of positive elements in an array in JavaScript
body: <p>I want to return an array of indices of an array which has positive elements using pure functions in JS. EX:</p>
  
  <p><code>pos([1,-4,0,5,2])</code></p>
  
  <pre><code>&gt;&gt;[0,2,3,4]
  </code></pre>
  
  <p>So, I tried: </p>
  
  <pre><code>  arr.map(function (ele){
     return arr.findIndex(ele =&gt; ele &gt; 0);
    })
  
  But my output is :[1,1,1,1]
  </code></pre>
  
  <p>Can someone tell me what is wrong? I believe that my map function is correct but something is wrong with findIndex(). (Please don't tell me the code as it is a question of my assignment. Only need hints.)</p>