Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 617ec6b commit 7fb345bCopy full SHA for 7fb345b
1 file changed
Maths/CoPrimeCheck.js
@@ -20,10 +20,10 @@ const GetEuclidGCD = require('./GetEuclidGCD')
20
* @returns return correspond boolean value, if both number are co-prime return `true`, else return `false`.
21
*/
22
const CoPrimeCheck = (firstNumber, secondNumber) => {
23
- // firstly, check that input is a number or not.
24
- if (typeof firstNumber !== 'number' || typeof secondNumber !== 'number') {
25
- return new TypeError('Argument is not a number.');
26
- }
+ // firstly, check that input is a number or not.
+ if (typeof firstNumber !== 'number' || typeof secondNumber !== 'number') {
+ return new TypeError('Argument is not a number.')
+ }
27
/*
28
This is the most efficient algorithm for checking co-primes
29
if the GCD of both the numbers is 1 that means they are co-primes.
0 commit comments