Smallest Common Multiple - weird issue

Tell us what’s happening:
Hi there,
I stuck in this challenge , my code accepts all tests except [23,18]
Is there something making value overflow?
Please help me

Your code so far


function smallestCommons(arr) {
  let tmp = arr.sort((x,y) => x-y); //sort array low to high

  let dividable = function (range, value ){//function return true if "value" accept division on all the range
    for(let i= range[0]; i<=range[1];i++){
      if(value % i !== 0){ return false;}
    }
    console.log(value);return true;
  };

  let result = 0;//my result variable
  let stop = true;//boolean to stop looping
  let i = 1;
  while(stop){        
      if(dividable(tmp, tmp[1] * i)) {
        result = tmp[1] * i;
        stop = false;
        }else{
          i++;
        }    
  } ;

 
  console.log(result);
  return result;
};


smallestCommons([23,18]);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36.

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

also when i put console.log(stop); under loop it shows true - how loop ends while the condition is true???

I made another code but same issue with [18,23]
Really i stuck with this challenge

function smallestCommons(arr) {
  let sorted = arr.sort((a,b) => a-b);
  let stopper = true;
  let result;
  let j = 1;
  let sum;
  while(stopper){
    sum = 0;
    for(let i = sorted[0]; i <= sorted[1]; i++){
      sum += (sorted[1] * j) % i;
    }
    if(sum == 0){
      result = sorted[1] * j;
      stopper = false;
    }else{
      j++;
    }
  }
  console.log(result);
  return result;
}

Finally i found the solution

function smallestCommons(arr) {
  let tmpArr = arr.sort( (x,y) => y-x);
  let range = [];
  for(let i = tmpArr[0]; i >= tmpArr[1]; i-- ) range.push(i);
  let result;
  let i = 1;
  let stopper = true;
  while(stopper){
    result = range[0] * i;
    if(range.every( x => result % x == 0)){
      stopper = false;
    }else{
      i++;
    }

  }
  return result;
}