Jak znaleźć HCF 2 liczb w JavaScript
var a = userInput[0].split(" ").map(Number)
while(a[0] != a[1])
{
if(a[0] > a[1]) {
a[0] = a[0] - a[1];
}
else {
a[1] =a[1] - a[0];
}
}
console.log(a[0])
Confused Chicken