Folks,

I am trying FCC Intermediate Algorithm Scripting: Smallest Common Multiple and have come up with my own code. It works fine with all the test but [23, 18]. Any idea why the following code does not return the correct result for [23, 18]. https://jsconsole.com/ and https://js.do/ sites run the code fine and output the correct results. I have come across some similar issues on FCC challenges.

```
function smallestCommons(arr) {
let scm = 0
let arr2 = [Math.min(...arr)];
for(let i = Math.min(...arr)+1; i <= Math.max(...arr); i++) {
arr2.push(i);
}
for (let k = 1; k <= arr2.reduce((x,y) => x*y); k++) {
if(arr2.every((n)=>{return (k % n === 0); })) {
scm = k;
break;
}
}
return scm
}
```