title: Why can I call functions declared later in the same script block, but not ones declared in later script blocks?
body: <p>I use this below cod and it works as expected:</p>
  
  <pre><code>&lt;script&gt;
    function_two();
    function function_two() {
      alert("The function called 'function_two' has been called.");
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>But when I apply to this code below, it doesn't work as expected:</p>
  
  <pre><code>&lt;script&gt;
    function_two();
  &lt;/script&gt;
  
  &lt;script&gt;
    function function_two() {
      alert("The function called 'function_two' has been called.");
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>Can someone say why?</p>