LCM

PHOTO EMBED

Fri Dec 03 2021 21:00:35 GMT+0000 (Coordinated Universal Time)

Saved by @tolanisirius

function lcm(a, b) {

  let theLCM = 0;
  let remainderA;
  let remainderB;

  do {

    theLCM++;
    remainderA = theLCM % a;
    remainderB = theLCM % b;

  } while (remainderA !== 0 || remainderB !== 0)

  return theLCM;
}
content_copyCOPY

https://www.jshero.net/en/koans/dowhile.html