title
Create a function named divisors that takes an integer and returns an array with all of the integer’s divisors(except for 1 and the number itself). If the number is prime return the string ‘(integer) is prime’ (use Either String a in Haskell).
Example
1 | divisors(12); //should return [2,3,4,6] |
My solution
1 | function divisors(integer) { |
good solution
1 | function divisors(integer) { |