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!