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; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter