**Tell us what’s happening:**

I’m not passing the last two tests. I don’t know if it has something to do with larger values.

**Your code so far**

```
function smallestCommons(arr) {
var small = Math.min(...arr);
var large = Math.max(...arr);
var array = [];
for(var i = small; i <= large; i++) {
array.push(i);
}
var x = true;
var LCM = 0;
while(x) {
LCM++;
for(var j = array[0]; j <= array[array.length - 1]; j++) {
if(LCM % j !== 0) {
break;
}
else if(j == array[array.length - 1]) {
x = false;
}
}
}
console.log(LCM);
return LCM;
}
smallestCommons([1,5]);
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36`

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple