findDivisorsByPairingUnsorted = number => {
  const divisors = [];

  const sqrt = Math.sqrt(number);

  for (let i = 1; i <= sqrt; i++) {
    if (number % i === 0) {
      divisors.push(i);
      if (i !== sqrt) {
        divisors.push(number / i);
      }
    }
  }
  return divisors;
}
Find all the divisors of a natural number
This solution has a cost of O(sqrt(n))
This method returns the divisors in an unsorted manner.
All divisors of a number are present in pairs.
Eg : For n=16: (1, 16), (2, 8), (4, 4).
     Include only one of the repeated divisors if any.

@param {number}
@returns {number[]} - returns the divisors