```
function smallestCommons(arr) {
var numbers = arr.sort();
var array = [];
for(var i = numbers[0]; i <= numbers[numbers.length - 1]; i++){
array.push(i);
}
var x=true;
var count=0;
while(x){
count++;
for(var j=array[0]; j<=array[array.length - 1]; j++){
if(count % j !== 0){
break;
}
else if(j == array[array.length - 1]){
x = false;
}
}
}
return count;
}
smallestCommons([1,5]);
```

works for the first four parameters, but fails on

smallestCommons([23, 18])