Skip to content

Instantly share code, notes, and snippets.

@butackle
Created October 7, 2017 05:04
Show Gist options
  • Save butackle/8c4c22696f68335a484ee6842c1dd283 to your computer and use it in GitHub Desktop.
Save butackle/8c4c22696f68335a484ee6842c1dd283 to your computer and use it in GitHub Desktop.
[...Array(20)].map((v,i) => [...Array(20)].slice(2).map((u, i) => i + 3).reduce((pV,num) => pV.some((pn) => !(num % pn)) ? pV : [...pV, num], [ 2 ]).some((v) => v === i +1 ) ? [...Array(20)].fill('*').map((v,ii) => ii === i ? '@' : '*').join('') : [...Array(20)].fill('*').join('')).join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment