Hanoi-tower recursive javascript implementation