The code below passes first 4 tests but not the last 2 of them. Can anyone explain why?

`smallestCommons([1, 5])`

should return a number.

Passed

`smallestCommons([1, 5])`

should return 60.

Passed

`smallestCommons([5, 1])`

should return 60.

Passed

`smallestCommons([2, 10])`

should return 2520.

`smallestCommons([1, 13])`

should return 360360.

`smallestCommons([23, 18])`

should return 6056820.

**Your code so far**

```
function smallestCommons(arr) {
arr.sort((a,b) => a - b);
let allNumbers = [];
for (let i = arr[0]; i <= arr[1]; i++) {
allNumbers.push(i);
}
for (let j = 1; j < j + 1; j++) {
if (allNumbers.every(x => j % x == 0 )) {
return j;
}
}
}
smallestCommons([1,13]);
```

**Your browser information:**

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

.

**Link to the challenge:**

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