I have an object that holds all my global variables and I'd to add a variable now, "position," that is itself an object. I tried
var g = {   
  var1: null,
  var2: null,
  position: {
    left: null, 
    top: null
  },
  var3: null
};
But this gives a compile error of:
SyntaxError: missing : after property id
position.left: null,
The idea is to be able to set position with
g.position.left = "200px";
Does anyone see the problem here?
 
    