Question: I just started learning JS and programming one small game for training. But I get a weird error while executing this object:

```
mainState = {
    name : "GAME_STATE",

    Setup: function( context, settings ) {
    }

    HandleKeyDown: function( event ) {
    }

    Update: function( settings ){

    }

    Draw: function( context, settings ){

    }
} 

```

And all that FireBug says is:

```
SyntaxError: missing } after property list
HandleKeyDown: function( event ) {

```

Thank you for your help!

Answer: 
You need to put comma between properties (key and its value), otherwise it is not a valid JavaScript Object and hence this compilation error thrown by Firebug 

> 
> SyntaxError: missing } after property list
> 
> 
> 

Here is the correct way to do it

```js
mainState = {
  name: "GAME_STATE",
  Setup: function(context, settings) {},
  HandleKeyDown: function(event) {},
  Update: function(settings) {},
  Draw: function(context, settings) {} // here no comma
}

```
You need add commas:

```
mainState = {
    name : "GAME_STATE",

    Setup: function( context, settings ) {
    },

    HandleKeyDown: function( event ) {
    },

    Update: function( settings ){

    },

    Draw: function( context, settings ){

    }
} 

```