Created
October 11, 2016 10:31
-
-
Save leolanese/64de242c73211186875b5fedcd2eb416 to your computer and use it in GitHub Desktop.
ES5 Declare Objects as Objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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