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: 
In javascript, you can easily create javascript objects, but first you must know the notation:

```
var jsObj1 = {}; //A very basic initiation.
var jsObj2 = {
    a: "a",
    b: "b",
    c: "c"
};

```

Here, as you can see, there are commas between every field of a JS object. For your situation here, you have created functions for each of your JS object's fields' values but forgot to put commas:

```
var mainState = {

    name : "GAME_STATE",

    Setup: function( context, settings ) {

    },

    HandleKeyDown: function( event ) {

    },

    Update: function( settings ) {

    },

    Draw: function( context, settings ) {

    }

};

```

So this will work without any error.
You need add commas:

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

    Setup: function( context, settings ) {
    },

    HandleKeyDown: function( event ) {
    },

    Update: function( settings ){

    },

    Draw: function( context, settings ){

    }
} 

```