I have managed to get passed most of the intermediate challenges but these last 3 maths-based ones I have struggled.

Is there anything I can research to help me understand what I’m doing without looking directly at the solution. So far I have sorted the array and got the range from greatest to smallest. My next plan was to loop through the sorted array and use a nested loop to do something like if (i % j === 0) if ( j < smallestMultiple) smallestMultiple = j;

Thanks, if i need to go back to earlier lessons and understand more of the basics to getting this I will do so, I felt the previous Primes challenge was a big jump from the challenges before that.

**Your code so far**

```
function smallestCommons(arr) {
arr.sort((a,b) => a -b);
let max = Math.max(...arr);
let min = Math.min(...arr);
let count = min + 1;
let numbers = arr.sort((a,b) => b-a)
}
console.log(smallestCommons([1, 5]))
```

**Your browser information:**

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

.

**Challenge:** Smallest Common Multiple

**Link to the challenge:**