Last active
July 2, 2016 21:23
-
-
Save dazld/946a99f3f07789f1994d25e6370a8a83 to your computer and use it in GitHub Desktop.
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
function findMultiplesOf(...nums){ | |
const max = 1000, | |
matches = new Set(); | |
for (let i = 0; i < max; i++) { | |
nums.forEach((num) => { | |
if (i % num === 0) { | |
matches.add(i); | |
}; | |
}); | |
} | |
return matches; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment