mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 09:28:26 +08:00
fix types error in GetGCD method
This commit is contained in:
@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
const getGcd = (arg1, arg2) => {
|
const getGcd = (arg1, arg2) => {
|
||||||
// Find a minimum of both numbers.
|
// Find a minimum of both numbers.
|
||||||
|
|
||||||
let less = arg1 > arg2 ? arg2 : arg1
|
let less = arg1 > arg2 ? arg2 : arg1
|
||||||
// Iterate the number and find the gcd of the number using the above explanation.
|
// Iterate the number and find the gcd of the number using the above explanation.
|
||||||
for (less; less >= 2; less--) {
|
for (less; less >= 2; less--) {
|
||||||
|
Reference in New Issue
Block a user