mirror of
https://github.com/EDeev/web-tech.git
synced 2026-06-15 11:01:08 +03:00
8 lines
No EOL
112 B
JavaScript
8 lines
No EOL
112 B
JavaScript
function gcd(a, b) {
|
|
while (b !== 0) {
|
|
let temp = b;
|
|
b = a % b;
|
|
a = temp;
|
|
}
|
|
return a;
|
|
} |