title: Reentrancy in JavaScript
body: <p>I would like to improve my understanding of the word reentrant.</p>
  
  <p>Is this function reentrant?</p>
  
  <pre><code>function* foo() {
    yield 1;
    yield 2;
  }
  </code></pre>
  
  <p>And this one?</p>
  
  <pre><code>function foo() {
    return 1;
  }
  </code></pre>
  
  <p>And this one?</p>
  
  <pre><code>var x = 0;
  function foo() {
    return x++;
  }
  </code></pre>
  
  <p>And this one?</p>
  
  <pre><code>function foo() {
    setTimeout(foo, 1000);
  }
  </code></pre>