Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/mcd.js Secret

Created April 20, 2021 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/cf8f7d40e07d0621eb9df574f65533e2 to your computer and use it in GitHub Desktop.
Save parzibyte/cf8f7d40e07d0621eb9df574f65533e2 to your computer and use it in GitHub Desktop.
const maximoComunDivisor = (a, b) => {
// https://parzibyte.me/blog
let temporal; //Para no perder b
while (b !== 0) {
temporal = b;
b = a % b;
a = temporal;
}
return a;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment