Created
June 17, 2017 05:53
-
-
Save matheustp/f9c793b13157d5643d3f5c4b3e085134 to your computer and use it in GitHub Desktop.
const divisors = [...Array(10).keys()].slice(1)
Eu faria assim:
const generateSequenceFromOneUntil = ( max ) =>
[ ...Array(max).keys() ].slice(1)
const divisors = generateSequenceFromOneUntil( 10 )
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deve encapsular tb a lógica para testar se existe um divisor, está assim:
Vc pode fazer assim: