this is my code for find the lowest common factor for a range of numbers. here it works well if lowest range is 1 or 2 but it does not work for other lowest range like 19,20,50 etc. but if I change the looping condition from traversing lowest range to highest range ( for(let j=arr[0];j<=arr[1];j++) ) To highest range to lowest range (for(let j=arr[1];j>=arr[0];j–))it works fine. but for my knowledge both for loop should work but it’s not. can anyone help me to figure out where I am missing

```
**Your code so far**
```

```
function smallestCommons(arr) {
arr.sort((a,b) =>a-b);
let k=arr[1];
for(let j=arr[0];j<=arr[1];j++){
if(k%j!==0){
j=arr[0];
k=k+arr[1];
}
}
console.log(k)
}
smallestCommons([6,8]);
```

```
**Your browser information:**
```

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

**Challenge:** Smallest Common Multiple

**Link to the challenge:**