This works just fine in chrome/firefox, but fails in IE 9. How can I do this correctly?
var Wrapper = function ()
{
this.loc = {};
this.loc.default = {}; // fails here in IE
this.loc.default.lat = 30;
this.loc.default.lon = -120;
};
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words
maybe it is due to that default is reserved keyword in JS
did you try with another instead of default