Smallest Common Multiple - adding comment or white space affects result

Tell us what’s happening:
When I add white space or comment to the code below, the result of the smallestCommons() call changes. THis only happens if the second parameter is 13 or higher. I stare at the code for long but have no idea what is wrong. Does anyone know why? How can comment/white space affect output?

Your code so far


function smallestCommons(arr) {

  let small = arr[0]<arr[1]?arr[0]:arr[1];
  let large = arr[0]<arr[1]?arr[1]:arr[0];

  let result = large;

  while ( !allDivisible(result, large, small) ) {
    result++;
  }

  return result;
}

//return true if n is divisible by all numbers between large and small inclusively
function allDivisible(n, large, small) {
 for (let i=large; i>=small; i--) {
   if (n%i!=0) return false; 
  }
  return true;
}

//console.log (12422%13!=0);
console.log( smallestCommons([1,13]) );
//adding comment or white space change result?!

Your browser information:

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

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

It isn’t really the whitespace that’s changing anything. Adding or removing the whitespace just re-runs the code and, for some reason, each time the code runs it produces a different result. Since the numbers seem to be within a range of +/- 10k, I wonder if the infinite loop protection is kicking in to murder the very long loop.