title: (document).ready is a global scope?
body: <p>Guys i have this function inside my script.js:</p>
  
  <pre><code>$(document).ready(function() {
      function alert() {
        alert('AAAAAAAA');
      }
  });
  </code></pre>
  
  <p>And i am trying to call here in my index.html:</p>
  
  <pre><code>$('.something').on('click', function() {
    e.preventDefault();
    alert();
  });
  </code></pre>
  
  <p>But is showing my this error - alert is not defined.</p>
  
  <p>But when i take off the document ready in the external script, the click handler will work. Why  is that?</p>
  
  <p>The document ready is creating a separate scope?</p>