Javascript how to find largest numbers in array, and record positions
<p>I would like to find the most concise way to find the index of the largest number in an array. 
Example:
<code>var array = [0,6,7,7,7];</code><br>
The function should return [2,3,4]</p>

<p>Note: it is not the same as <a href="https://stackoverflow.com/questions/11301438/return-index-of-greatest-value-in-an-array">Return index of greatest value in an array</a>
Why? There the answers return only one of the largest. e.g <code>var array = [0,6,7,7,7]</code> would return 2 or 4.</p>

<p>Update:
Quite a few people have marked this as a duplicate question. IT IS NOT! I explained the difference in the note above. Where is the supposed answer to what I am asking in <a href="https://stackoverflow.com/questions/11301438/return-index-of-greatest-value-in-an-array">Return index of greatest value in an array</a><br>
I am also disheartened by the fact my first question was down voted almost immediately.</p>

<p>Update: Found another answer at <a href="https://stackoverflow.com/questions/11301438/return-index-of-greatest-value-in-an-array">Return index of greatest value in an array</a>  </p>