I know this is very basic, but why does x return undefined in this code block? Is there a way to define a property and immediately use it to set another property?
var grid = {
x : 75,
y : 75,
location : [grid.x, grid.y],
init : function () {
console.log(grid.location[0]);
}
}