Skip to content

Instantly share code, notes, and snippets.

@jamc92
Last active March 5, 2016 20:28
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 jamc92/c2f6c7082402e009f428 to your computer and use it in GitHub Desktop.
Save jamc92/c2f6c7082402e009f428 to your computer and use it in GitHub Desktop.
Find numbers divisibles by 2, 3 y 5
function findDivisor() {
var numbers = [];
var number = 100000;
while (numbers.length < 6) {
for (var i = 0; i < 6; i++) {
if (number % 2 == 0 && number % 3 == 0 && number % 5 == 0){
var divisor = numbers.push(number);
}
number++;
}
}
console.log(numbers);
}
findDivisor();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment