I'm creating a Grid object using the following code:
var Grid = { rows: 5, cols: 6, getDimensions: function() { console.log(rows + ' by ' + cols); }(), }; My getDimensions function isn't working however because it cannot reference the rows and cols properties that I previously set. this is set to the window so I'm not sure how I would reference these properties.