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

  for (let i = 1; i <= number; i++) {
    if (number % i === 0) {
      divisors.push(i);
    }
  }
  return divisors;
}
Find all the divisors of a natural number
This solution has a cost of O(n)
This solution uses the naive method to print all divisors

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