Hi all,
I would like to ask a question about javascript( I think it's prototype based) function declarations.
While using third party js module(http://tags.expo9.exponential.com/ta...tv/BTF/tags.js), I am stuck with a question.
Let me list down the function declaration:
expo9_ad = (function() {
var version = "1.20";
var displayAdVersion = "0.3";
function expo9_ad() {
var t = this;
t.host = "a.tribalfusion.com";
...
}
expo9_ad.prototype.showAd = function () {
var t = this;
t.url = "";
...
}
...
...
return expo9_ad;
})();
It seems to me like this :
expo9_ad = (function() {return expo9_ad;})();
But I can't understand how it works.
Any help would be appreciate.
Thank you,
Christopher
I would like to ask a question about javascript( I think it's prototype based) function declarations.
While using third party js module(http://tags.expo9.exponential.com/ta...tv/BTF/tags.js), I am stuck with a question.
Let me list down the function declaration:
expo9_ad = (function() {
var version = "1.20";
var displayAdVersion = "0.3";
function expo9_ad() {
var t = this;
t.host = "a.tribalfusion.com";
...
}
expo9_ad.prototype.showAd = function () {
var t = this;
t.url = "";
...
}
...
...
return expo9_ad;
})();
It seems to me like this :
expo9_ad = (function() {return expo9_ad;})();
But I can't understand how it works.
Any help would be appreciate.
Thank you,
Christopher
Comment