**Tell us what’s happening:**

I’m getting the correct answer when I run my code in nodejs but the last test case is failing in FCC editor. Am I missing something?

**Your code so far**

```
function smallestCommons(arr) {
arr = arr.sort((a,b) => a - b)
arr = Array(arr[1] - arr[0] + 1).fill(arr[0]).map((x,y) => x + y)
let lcm = 2
let isLCM = false
while(!isLCM) {
if(arr.every(num => lcm % num === 0)) {
isLCM = true
break;
}
lcm++
}
return lcm
}
smallestCommons([23,18]);
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36`

.

**Link to the challenge:**

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