title: WHY JSLint complains: "someFunction() was used before it was defined"?
body: <p>Searching for the JSLint error "was used before it was defined" i've found these:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/806163/jslint-using-a-function-before-its-defined-error">JSLint: Using a function before it&#39;s defined error</a></li>
  <li><a href="https://stackoverflow.com/questions/12963161/function-was-used-before-it-was-defined-jslint">Function was used before it was defined - JSLint</a></li>
  <li><a href="https://stackoverflow.com/questions/9621162/jslint-was-used-before-it-was-defined">JSLint: was used before it was defined</a></li>
  <li><a href="https://stackoverflow.com/questions/7425147/jslint-error-somefunction-was-used-before-it-was-defined">jsLint error: “somefunction() was used before it was defined”</a></li>
  <li><a href="https://stackoverflow.com/questions/6744692/jslint-should-we-tolerate-misordered-definitions">jslint - Should we tolerate misordered definitions?</a></li>
  </ul>
  
  <h1>Problem</h1>
  
  <p>None of those answers <strong>WHY</strong> the error is shown.</p>
  
  <h1>Elaboration</h1>
  
  <p>According to the <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf" rel="nofollow noreferrer">ECMA-262 Specification</a> functions are evaluated before execution starts, hence all functions declared using the <code>function</code> keyword are available to all the code idenpendent of the place they were declared (assuming they are acessible on that scope).</p>
  
  <p>This is otherwise known as <strong>hoisting</strong>.</p>
  
  <p>Douglas Crockford seems to think it is better to declare every function before the code that uses it regardless of the <strong>hoisting</strong> effect.</p>
  
  <p>According to <a href="https://stackoverflow.com/users/253976/stackoverflownewbie">StackOverflowNewbie</a> in his <a href="https://stackoverflow.com/questions/7425147/jslint-error-somefunction-was-used-before-it-was-defined">question</a>, this raises some code organization problems. Not to mention some people, like me, prefer to declare their functions underneath the main/init code.</p>
  
  <p>On those questions there are some ways to avoid or fix the error, such as using function expressions vs function declarations. But none of them showed me the reason of the error. Not even <a href="http://javascript.crockford.com/code.html" rel="nofollow noreferrer">Crockford's site</a>.</p>
  
  <h1>Question(s)</h1>
  
  <p><strong>Why</strong> is it an error to call a function before the declaration, even if it was declared using the <code>function</code> keyword?</p>
  
  <p>Is it better to use function expressions instead of function declaration in the JSLint context? If one is preferred, why?</p>
  
  <h2>Note</h2>
  
  <p><strong>Not</strong> looking for answers like:</p>
  
  <ul>
  <li>Crockford is a tyrant</li>
  <li>Is just Crockford's opinion</li>
  </ul>
  
  <p>Thank you :*</p>