added js version of problem 1

This commit is contained in:
ikselven 2017-07-04 00:13:17 +02:00
parent c83ec18a1e
commit be5d7c1444

8
1/euler001.js Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/node
console.log(
[...Array(999).keys()]
.filter( x => (x+1) % 3 == 0 || (x+1) % 5 == 0)
.reduce( (sum, x) => sum + x + 1)
+ 1
);