percentile
Calculates the percentage of numbers in the given array that are less or equal to the given value.
- Use
Array.prototype.reduce()
to calculate how many numbers are below the value and how many are the same value and apply the percentile formula.