I think my code is logically correct but maybe too brutish.

My first guess is that it’s timing out on the last set with the larger numbers… but then I saw that many others have had the same problem. I’ve looked through the problems other people were having and still don’t see my error. Any help would be appreciated.

Thanks

```
function smallestCommons(arr) {
// functional sort arr into an array called order
let order = arr[0] > arr[1] ? [arr[1],arr[0]] : [...arr];
// declare an empty array to hold the subset
let subSet = [];
// while loop condition
let found = false;
// add range of numbers to subset (includes origial low number)
for ( let n=order[0]; n<order[1]; n++ ) {
subSet.push(n);
}
// multiplier
let i=1;
while(!found){
let count = 0;
// multiply original high number by iteration
let num = i*order[1];
// loop through subset and count the number of even divisions...
// multiplying by order[1] means we don't have to check the high number
for ( let j=subSet[0]; j<order[1]; j++ ) {
if ( num % j === 0 ){
count++;
}
}
// if we find a num value that returns and even division for everything in the subset, break the loop and return the number, else itterate the multiplier...
if ( count === subSet.length ){
found = true;
return num;
}else{
i++;
}
}
}
```