title: How to work Towers of Hanoi code in typescript?
body: <p>Here I was able to replicate a python version to typescript of Towers of Hanoi after fixing some errors I was not able to run it, I tried every option to switch some of the code but it still doesn't run. A little guide of what went wrong of my Towers of Hanoi code. Here's the code.</p>
  <pre><code>let A = [1, 2, 3];
  let B = [];
  let C = [];
  
  function move(n, source, auxiliary, target) {
    if (n &gt; 0) {
        move(n, source, target, auxiliary)
        target.append(source.pop());
        console.log(A);
        console.log(B);
        console.log(C);
        console.log('##############', n);
        move(n - 1, auxiliary, source, target);
    }
  }
  
  move(3, A, B, C);
  </code></pre>
  <p>Original Python code: <a href="https://en.wikipedia.org/wiki/Tower_of_Hanoi" rel="nofollow noreferrer">Towers of Hanoi</a></p>
  <pre><code>A = [3, 2, 1]
  B = []
  C = []
  
  def move(n, source, target, auxiliary):
      if n &gt; 0:
      move(n - 1, source, auxiliary, target)
      target.append(source.pop())
      print(A, B, C, '##############', sep='\n')
      move(n - 1, auxiliary, target, source)
      
      move(3, A, C, B)
  </code></pre>