title: SyntaxError: invalid label with javascript game
body: <p>I am following the following tutorial on how to make a space invaders game - <a href="http://www.html5rocks.com/en/tutorials/canvas/notearsgame/" rel="nofollow">http://www.html5rocks.com/en/tutorials/canvas/notearsgame/</a></p>
  
  <p>However error message in the title is displayed when this code is executed and the game doesn't display. The invalid label indicates that the "y" at the start of the second line within the return function is the culprit of the error.</p>
  
  <pre><code>player.midpoint = function()
  {
      return
      {
          x: this.x + this.width/2,
          y: this.y + this.height/2
      };
  };
  </code></pre>
  
  <p>However when I take this code out the game runs fine, only when I press space to fire the game freezes as it requires the above function to fire bullets. </p>