I have taken a break from learning code. I came back and everything is gone from my head. I wanted to make a simple programme to find numbers divisible by any integers (eg divisble by 5,6,9,10 or 4,7,25)
I made this so far:
var multipleOf = function() {
for (var i = 1; i < 1000; i*2) {
if (i%3 === 0) {
if (i%4 === 0) {
if (i%5 === 0) {
return(i);
}
}
}
}
};
But there are a few problems. It doesn't seem to work as it is ( I think some python might be slipping into it) It isn't scalable, I have to change the code for a different amount of numbers (eg all prime numbers 1-100 would be a lot of coding as opposed to just typing in the numbers)
Can someone help me make code which could be run something like this:
console.log(multipleOf(2,5,8,12,15,17,20))