/* Bonfire: Smallest Common Multiple */

function smallestCommons(arr) {



  console.log(arr);
  return arr;
}


smallestCommons([1,5]);

@@ -70,48 +70,886 @@
 ) %7B%0A
-%0A%0A%0A  console.log(arr);%0A  return arr;%0A%7D%0A%0A
+  var start;%0A  var stop;%0A  function leastCommon(a, b)%7B%0A    var lcm = b * (b - 1);%0A    console.log(%22starting lcm = %22 + lcm);%0A    b -= 2;%0A    while (b %3E= a)%7B%0A      console.log(%22b %3E= a%22);%0A      if ( lcm %25 b === 0)%7B%0A        console.log(lcm);%0A      %7Delse%7B%0A        lcm *= b;%0A        console.log(lcm);%0A      %7D%0A      b--;%0A    %7D%0A    return lcm;%0A  %7D%0A  if( arr%5B0%5D %3C 0 %7C%7C arr%5B1%5D %3C 0)%7B%0A    return %22Negative numbers are not conventional inputs for finding a Least Common Mulitple and are therefore invalid.%22;%0A  %7Delse if( arr%5B0%5D === arr%5B1%5D)%7B%0A    return %22Two unique numbers must be supplied in the function call to produce a nontrivial solution for the Least Common Multiple.%22;%0A  %7Delse if(arr%5B0%5D %3C arr%5B1%5D )%7B%0A    start = arr%5B0%5D;%0A    stop = arr%5B1%5D;%0A    return leastCommon(start, stop);%0A  %7Delse if(arr%5B0%5D %3E arr%5B1%5D)%7B%0A    start = arr%5B1%5D;%0A    stop = arr%5B0%5D;%0A    return leastCommon(start, stop);%0A  %7D%0A%7D
 %0Asma

Work on Bonfires Project