Last active
August 29, 2015 14:18
-
-
Save nainglinaung/1a7f454e84d4990abd62 to your computer and use it in GitHub Desktop.
The sum of number less than 1000 which is divisible by 3 or 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(Array.apply(null, Array(1000)).map((_, i)=>i+1).filter(v=> v%5==0||v%3==0).reduce((a,b)=>a+b)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment