Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ES5 Declare Objects as Objects
// ES5 Declare Objects as Objects:
// not that good
var service = {};
service.winJsApp = null;
service.winJSActivation = 1;
service.actions = {
goToView: "goToView",
goToModal:"goToModal"
};
// better
var service2 = {
winJsApp: null,
winJSActivation: 1,
actions : {
goToView: "goToView",
goToModal:"goToModal"
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment