Lists every factor of a number.
A non-zero safe integer.
The factors of n in ascending order, including 1 and the absolute value of n.
n
Negative numbers are judged by their absolute value.
TypeError If n is not a number.
TypeError
RangeError If n is zero, not an integer, or outside the safe integer range.
RangeError
1.0.0
factors(12); // [1, 2, 3, 4, 6, 12]factors(-6); // [1, 2, 3, 6] Copy
factors(12); // [1, 2, 3, 4, 6, 12]factors(-6); // [1, 2, 3, 6]
Lists every factor of a number.