Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Aug 18th, 2017
224
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.24 KB
| None
|
0
0
raw
download
clone
embed
print
report
function greatestCommonDivisor([a, b]) {
max = a;
if (b > a) {
max = b;
}
for (i = max; i > 0; i--) {
if (a % i == 0 && b % i == 0) {
console.log(i);
break;
}
}
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
API-Flaw Profit Guide
CSS | 36 min ago | 0.99 KB
⭐ $12,000 two day
CSS | 56 min ago | 0.99 KB
Populate HTML Table from API
HTML 5 | 2 hours ago | 1.53 KB
Untitled
6 hours ago | 0.06 KB
Schrödinger's Crit
3 days ago | 15.37 KB
PRCE internal cursor
3 days ago | 0.73 KB
AI Interaction Method
3 days ago | 1.60 KB
awkwrapper.c
C | 3 days ago | 2.35 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!