title: What is the difference between an object's scope and its context in javascript?
body: <p>In the vernacular, <strong>scope</strong> and <strong>context</strong> have a lot in common.  Which is why I get confused when I read references to both, such as in the quote below from an article on closures:</p>
  
  <blockquote>
    <p><strong>Scope</strong> refers to where variables and functions are accessible, and in what <strong>context</strong> it is being executed. (<a href="http://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/" rel="nofollow noreferrer">@robertnyman</a>)</p>
  </blockquote>
  
  <p>As far as I can tell, context is just a reference to an object.</p>
  
  <p>Can someone please explain what exactly is <strong>context</strong>, as used, for instance, in the jQuery syntax, <code>$(selector, context)</code>. And is an object's <strong>scope</strong> the same at it's <strong>context</strong>? </p>
  
  <hr />
  
  <blockquote>
    <p><strong>Update:</strong></p>
    
    <p>I found this interesting article that talks about both scope and context in JavaScript.</p>
    
    <p><a href="http://www.digital-web.com/articles/scope_in_javascript/" rel="nofollow noreferrer">http://www.digital-web.com/articles/scope_in_javascript/</a></p>
  </blockquote>