made with esnextbin
Created
May 11, 2016 18:15
-
-
Save FiberJW/620b416a4c881497ee18920a2b4ab2d9 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lcm(x, y) { | |
let num = 1; | |
let lcmFound = false; | |
if (x === y) { | |
return x; | |
} | |
while (!lcmFound) { | |
if (num % x === 0 && num % y === 0) { | |
lcmFound = true; | |
} else { | |
num++; | |
} | |
} | |
return num; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
function lcm(x, y) { | |
var num = 1; | |
var lcmFound = false; | |
if (x === y) { | |
return x; | |
} | |
while (!lcmFound) { | |
if (num % x === 0 && num % y === 0) { | |
lcmFound = true; | |
} else { | |
num++; | |
} | |
} | |
return num; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment