I found the source code like this. I am familiar with javascript anonymous function though,
what is :
?
For example
When I call createOverlays
function with argument, how can I make it ?
I am googling around about :
but unable to find good explanation.
I might not understand the basic javascript structure.
Please give some hint.
var World = {
init: function initFn() {
this.createOverlays();
},
createOverlays: function createOverlaysFn() {
// some function
},
}
simply solved. I can pass the argument like this.
var World = {
init: function initFn() {
this.createOverlays(1);
},
createOverlays: function createOverlaysFn(arg) {
// some function
console.log(arg) //show 1
},
}