Solve Tower of Hanoi recursively with JavaScript