title: How to fix '$' was used before it was defined in both jslint and jshint using coding?
body: <p>I am using <strong>jQUery</strong> . And in <strong>jslint</strong>, I keep on </p>
  
  <pre><code>'$' was used before it was defined.
  </code></pre>
  
  <p>or </p>
  
  <pre><code>document was used before it was defined.
  </code></pre>
  
  <p>I know I can stop those from showing up by using </p>
  
  <pre><code>/*jslint browser: true*/
  /*global $, jQuery*/
  </code></pre>
  
  <p>But I wanted to actually <strong>fix this through coding</strong> if possible. So, I did like before.</p>
  
  <pre><code>var $, document;
  $(document).ready(function () {
      "use strict";
  </code></pre>
  
  <p>However, now it says </p>
  
  <pre><code>Two warnings
  1   Redefinition of '$'.
  1   Redefinition of 'document'.
  </code></pre>
  
  <p>in <strong>jshint</strong>. Is there a coding that I can use to please <strong>both jshint and jslint</strong>?</p>