Last active
April 26, 2016 08:56
-
-
Save 7rin0/42f25fa83eded9f26d5a3090f61aa725 to your computer and use it in GitHub Desktop.
This file contains 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
// Start application from japplascript.init() | |
var global_one, | |
global_two, | |
global_three, | |
japplascript = { | |
function_one: function () { | |
console.log('inside function one'); | |
console.log(global_one); | |
console.log(global_two); | |
}, | |
// Object settings | |
settings: { | |
abc: 123, | |
def: 456, | |
efg: 789 | |
}, | |
// "constructor" | |
init: function () { | |
var s = this.settings; | |
// Add value to a global var | |
global_one = 'not empty'; | |
// Log values from other methods/properties | |
console.log('init japplascript'); | |
console.log(s); | |
console.log(s.abc); | |
this.function_one(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment