Skip to content

Instantly share code, notes, and snippets.

@dazld
Last active July 2, 2016 21:23
Show Gist options
  • Save dazld/946a99f3f07789f1994d25e6370a8a83 to your computer and use it in GitHub Desktop.
Save dazld/946a99f3f07789f1994d25e6370a8a83 to your computer and use it in GitHub Desktop.
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