Hi everyone.

I am having some trouble with this problem. Specifically, I don’t understand how to factor in the fact that a number outside the range of values could divide the LCM value into a smaller number.

i.e.

```
function smallestCommons(arr) {
var b = [];
var c = [];
if (arr[1]<arr[0]){
c[0]=arr[0];
c[1]=arr[1];
} else {
c[0]=arr [1];
c[1]=arr[0];
}
for(var i=c[1];i<=c[0]; i++) {
b.unshift(i);
}
var lCM = b.reduce(function(acc,val){
if (acc % val != 0) {
return acc = acc * val;
} else {
return acc;
}
});
return lCM;
}
smallestCommons([23, 18]);
```

`

For example, an input of [23,18] with this code gives an answer of 72,681,840. The true answer is 6,056,820 (my answer divided by 12). I’m not seeing a way around this and may need a fresh perspective. I have burned through the hints. I have 6 intermediate challenges left and they are all leaving me stumped!

Thanks,

Jim