execute: function() {
for (var i in TXZ.dEvent) {
if (i != 'initilize' && i != 'execute' && typeof TXZ.dEvent[i] == 'function') {
TXZ.dEvent[i];
}
}
}
I want to execute all functions that evaluate to true but I can’t seem to get the syntax to actually run the function correctly. I know I’m near, but I can’t seem to find any help on this issue online.
I don’t know why this works though if anyone cares to explain. I know that TXZ.dEvent[i] holds the value but when you add “()” it seems to execute the function (in my case). If the value is already a function then in reality what we are doing is “function() { … }()” which doesn’t make much sense.