title: JQuery: Are variables declared inside $(document).ready(); globals? And when can globals be avoided?
body: <p>The concept of globals is starting to solidify. Any variable outside of a function is a global, correct? <strong>If variables are contained within <code>$(document).ready( function() { *code* } );</code>, are they considered global?</strong> </p>
  
  <p>I figured out a workaround to put a frequently used array into the function that uses said array, but now I am essentially using my HTML content as my globals, if that makes sense (for example, using text inside a div and passing it into a function). Is this how people typically go about constantly changing/often referenced variables?</p>
  
  <p>If they are not globals, should I still enclose the variables inside functions to develop good practice?</p>