Skip to content

Instantly share code, notes, and snippets.

@karolk
Created October 12, 2017 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karolk/5f601445b779c2871d04a041e0dfbc56 to your computer and use it in GitHub Desktop.
Save karolk/5f601445b779c2871d04a041e0dfbc56 to your computer and use it in GitHub Desktop.
Euler 1
Array(999)
.fill(1)
.map((n, index) => n + index)
.filter(n => n % 3 === 0 || n % 5 === 0)
.reduce((a, b) => a + b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment