var a = {
init: function(){
this.b.c();
},
b : {
constant: 'some constant',
c: function(){
alert( this.constant );
}
}
}
a.init();
I have been writing JavaScript for short while now. It suddenly occurred to me that I have not been using this
. Writing out the entire naming for each call is quite annoying and time consuming.
In the above code is the implementation of this
cross-browser compatible or does anyone know if I am using this incorrectly?