title: Uncaught SyntaxError: Unexpected token case
body: <p>I am coming across a problem in my code. It's telling me I have an:</p>
  <blockquote>
  <p>&quot;Uncaught SyntaxError: Unexpected token case&quot;</p>
  </blockquote>
  <p>and I'm not entirely sure what that means. Any help would be greatly appreciated! The problem seems to start with this line of code.</p>
  <pre><code>{
     case UP:
        mowerPosition[mowerY][mowerX] = 0; 
        pattern[mowerY][mowerX] = 1; 
        mowerY--;
        if (mowerY &gt;= 0) {
           mowerPosition[mowerY][mowerX] = 1; 
        } else {
           mowerY++;
           mowerPosition[mowerY][mowerX] = 1; 
        }
        break;
     case DOWN:
        mowerPosition[mowerY][mowerX] = 0; 
        pattern[mowerY][mowerX] = 1; 
        mowerY++;
        if (mowerY &lt; COLUMNS) {
           mowerPosition[mowerY][mowerX] = 1; 
        } else {
           mowerY--;
           mowerPosition[mowerY][mowerX] = 1; 
        }
        break;
     case RIGHT:
        mowerPosition[mowerY][mowerX] = 0; 
        pattern[mowerY][mowerX] = 1; 
        mowerX++;
        if (mowerX &lt; ROWS) {
           mowerPosition[mowerY][mowerX] = 1; 
        } else {
           mowerX--;
           mowerPosition[mowerY][mowerX] = 1;
        }
        break;
     case LEFT:
        mowerPosition[mowerY][mowerX] = 0; 
        pattern[mowerY][mowerX] = 1; 
        mowerX--;
        if (mowerX &gt;= 0) {
           mowerPosition[mowerY][mowerX] = 1; 
        } else {
           mowerX++;
           mowerPosition[mowerY][mowerX] = 1;
        }
        break;
     }
  </code></pre>