title: Rank any number in an array using javascript
body: <p>I’m looking for a function that will equal the <a href="https://support.office.com/en-gb/article/RANK-function-6a2fc49d-1831-4a03-9d8c-c279cf99f723" rel="nofollow noreferrer">RANK function in Excel</a>. </p>
  
  <blockquote>
    <p>Returns the rank of a number in a list of numbers. The rank of a
    number is its size relative to other values in a list. (If you were to
    sort the list, the rank of the number would be its position.)</p>
  </blockquote>
  
  <p>That is, take an array of (say 15) numbers, some of which might be identical, examine any number in the array and establish which rank in the array it holds. The highest number in the array is allocated a rank of 1 and identical numbers should hold the same ranking. Can anyone shed light on this?</p>