title: Javascript Expected expression and missing case or statement errors
body: <p>I have the two errors - "Expected expression" (3rd line) and "missing case or statement error" (35th line). Here is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30];
  
  function month(number)
  {
      var res = 0;
  
      for(i = 0; i &lt; number; i++)
          res += days[i];  
          
          return res;  
  }
  
  function counter()
  {
      var date = new Date();
  
      if((date.getFullYear() % 4) == 0 &amp;&amp; (date.getFullYear() % 100) != 0)
          days[1] = 29;
  
      return (month(date.getMonth()) += date.getDate());
  }
  
  function season(day)
  {
      if (day &gt; month(2) + 20 &amp;&amp; day &lt;= month(5) + 21)
          return 0;
      else if (day &gt; month(5) + 21 &amp;&amp; day &lt;= month(8) + 22)
          return 1;
      else if (day &gt; month(8) + 22 &amp;&amp; day &lt;= month(11) + 21)
          return 2;
  
      return 3;
  }
  
  switch(season(counter()))
  {
      case 0:
          document.getElementById("im").src = "wiosna.jpg";
          break;
  
      case 1:
          document.getElementById("im").src = "lato.jpg";
          break;
  
      case 2:
          document.getElementById("im").src = "jesień.jpg";
          break;
  
      case 3:
          document.getElementById("im").src = "zima.jpg";
          break;
  
      default:
          break;
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I don't know why it doesn't work.. When i delete the first function then it points the next function. Any ideas? Thanks for help!</p>