Jump to content

Towers of Hanoi: Difference between revisions

m
(Added LOLCODE)
Line 1,456:
=={{header|JavaScript}}==
<lang javascript>function move(n, a, b, c) {
if (n > 0) {
move(n-1, a, c, b);
console.log("Move disk from " + a + " to " + c);
move(n-1, b, a, c);
}
}
move(4, "A", "B", "C");</lang>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.