title: Javascript change recursive function with trampoline version
body: <p>How can the below code be changed to use the trampoline function? Thanks.</p>
  
  <pre><code>var count = function (n) {
      if(typeof n !== 'number' || n % 1 !== 0) return null;
      if(n &lt; 3) { return 1; }
      console.log(n)
      return count(n - 1) + count(n - 3)
  }
  </code></pre>