loading...

re: What’s your alternative solution? Challenge #18 VIEW POST

FULL DISCUSSION
 

Short and sweet, code golf style!

const isPrime=n=>[...Array(n-2)].map((_,i)=>i+2).filter(i=>n%i==0).length==0
code of conduct - report abuse