Smallest Common Multiple bug?

Tell us what’s happening:

Why this code does not pass the challenge?

Your code so far

function smallestCommons(arr) {
 let min=Math.min(arr[0],arr[1]);
 let max=Math.max(arr[0],arr[1]);
 let newArr=[];

 for(let i=min;i<=max;i++){
var res = 0;
  var l = 1;
  var n;

  // Run code while n is not the same as the array length.
  do {
    res = newArr[0] * l * newArr[1];
    for (n = 2; n < newArr.length; n++) {
      if (res % newArr[n] !== 0) {

  } while (n !== newArr.length);

  return res;


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0.

Link to the challenge:

your code worked perfectly for me. I think you should reset the code and refresh the browser and just copy it back in and run it. Hopefully it works that time.