Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@7rin0
Last active April 26, 2016 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7rin0/42f25fa83eded9f26d5a3090f61aa725 to your computer and use it in GitHub Desktop.
Save 7rin0/42f25fa83eded9f26d5a3090f61aa725 to your computer and use it in GitHub Desktop.
// 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