title: Is inline/block Javascript executed before document-ready?
body: <p>Assuming one has inline Javascript code in a HTML document (the body for example), is this piece of Javascript always executed before JQuery document-ready code?</p>
  
  <p>For example, is the following safe?</p>
  
  <pre><code>...
  &lt;body&gt;
      &lt;script type="text/javascript"&gt;
          var myVar = 2;
     &lt;/script&gt;
     ...
  &lt;/body&gt;
  
  ...
  $(document).ready(function() {
      alert('My Var = ' + myVar);
  }
  </code></pre>
  
  <p>If not, how can I make it safe knowing <code>myVar</code> is defined in an inline/block code?</p>