Skip to content

zubayerhimel/fun-gcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Greatest Common Divisor (GCD) using Euclidean Algorithm.

Install

npm i fun-gcd

Usage

// es5
const eq = require("fun-gcd");

// es6
import eq from "fun-gcd";

console.log(eq.gcdOfTwo(2, 3));
// => 1

console.log(eq.gcdOfTwo(7, 77));
// => 7