Could you please help why this code have an infinite loop?

```
function smallestCommons(arr) {
var lst = [];
for (var m = Math.min(arr[0], arr[1]); m <= Math.max(arr[0], arr[1]); m++) {
lst.push(m);
}
var i = lst.reduce(function(a,b){return a*b;});
var k = lst.reduce(function(a,b){return a*b;});
while (i > 1) {
for (var j = lst[0]; j <= lst[lst.length-1]; j++) {
if (i%j !== 0) {
break;
} else {
k = i;
}
}
i--;
}
return k;
}
```