title: Why does JSLint complain about "Unexpected 'else' after 'return'"?
body: <p>JSLint complains that the following (useless example) code is invalid:</p>
  
  <pre><code>(function (x) {
      "use strict";
      if (x === 1) {
          return 1;
      } else if (x === 2) {
          return -1;
      }
      return 0;
  }(1));
  </code></pre>
  
  <blockquote>
    <p>Error:
    Problem at line 4 character 9: Unexpected 'else' after 'return'.</p>
    
    <p>return 1;</p>
  </blockquote>
  
  <p>Is it seriously suggesting that it's bad to use return statements inside an if/else structure?</p>
  
  <p>It thinks this version is fine:</p>
  
  <pre><code>(function (x) {
      "use strict";
      var returnval = 0;
      if (x === 1) {
          returnval = 1;
      } else if (x === 2) {
          returnval = -1;
      }
      return returnval;
  }(1));
  </code></pre>