← Back to JavaScript exercises

48. Swap Two Numbers

Result appears here
function gcd(a,b){while(b)[a,b]=[b,a%b];return a}output.textContent=gcd(48,18);