title: JSLint - problems declaring variables
body: <p>The following code passes JSLint:</p>
  
  <pre><code>var sGreeting = 'hello world';
  
  switch (sGreeting)
  {
  case 'Hello world!':
      var a = 'some a value';
      break;
  case 'Kamusta mundo!':
      var b = 'some b value';
      break;
  case 'Salut le Monde!':
      var c = 'some c value';
      break;
  default:
      break;
  }
  </code></pre>
  
  <p>However, once I put that code in a function, JSLint complains that I should <code>Combine ... with the previous 'var' statement.</code> If I follow JSLint, I would be defining variables that may never need to be used. <strong>How should I deal with this problem?</strong> Here's the code followed by JSLint's errors:</p>
  
  <pre><code>function foo()
  {
      'use strict';
      var sGreeting = 'hello world';
  
      switch (sGreeting)
      {
      case 'Hello world!':
          var a = 'some a value';
          break;
      case 'Kamusta mundo!':
          var b = 'some b value';
          break;
      case 'Salut le Monde!':
          var c = 'some c value';
          break;
      default:
          break;
      }
  }
  
  
  Error:
  Problem at line 9 character 7: Combine this with the previous 'var' statement.
  var a = 'some a value';
  
  Problem at line 12 character 7: Combine this with the previous 'var' statement.
  var b = 'some b value';
  
  Problem at line 15 character 7: Combine this with the previous 'var' statement.
  var c = 'some c value';
  </code></pre>