Hello all,

I’m am currently working the Smallest Common Multiple algorithm challenge.

I am able to get the least common multiple - by coding out the formula mentioned in the Wikipedia link under Hints.

The part I can’t seem to wrap my head around (for longer than I’d like to admit haha)…

Is how to check if the value is divisible by the range of the two arguments?

Making an array of the range -made sense to me, but I’m not sure what to do with it?

```
function smallestCommons(arr) {
var min = Math.min(arr[0],arr[1]);
var max = Math.max(arr[1],arr[1]);
var range = [];
for(i = min; i < max; i++){
range.push(i);
}
return lcm(min, max);
}
function lcm(a,b){
return (a * b) / gcd(a,b);
}
function gcd(a,b){
if(!b){
return a;
}
return gcd(b, a % b);
}
smallestCommons([1,5]);
```

I might be approaching this in the wrong way altogether - so any feedback is appreciated.