**Tell us what’s happening:**

So, here is an attempt at the first part of the challenge. Would anyone mind giving me a critique of my logic? Here it is:

I’m trying to use the inequality of i and j to push the loop forward, thinking that when they become equal that would mean that I’d found the LCM because it would have stopped the loop at the first value that both i and j equaled. Considering that one is lesser than the other, that value would be, logically, the smallest common multiple.

I know there’s something up with it, but I can’t see it right now.

**Your code so far**

```
function smallestCommons(arr) {
let result = [];;
let first = arr[0];
let second = arr[1];
let i, j;
for(i = first; i !== j; i++){
first + first;
for(j = second; j !== i; j++){
second + second;
if(i===j){
result.push(i)
}
}
}
return arr;
}
smallestCommons([23,18]);
//find the smallest shared multiple of each value
```

**Your browser information:**

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

.

**Link to the challenge:**

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple/