I am looking at code that appears to be declaring a function that would need to be called to run. This function is being declared within an anonymous function. Doesn't this mean that the function will be inaccessible to anything outside of this block?
(function () {
var _d = vjo.dsf.EventDispatcher;
var _r = vjo.Registry;
function $1(p0) {
return function (event) {
return this.onSubmit(p0, event);
};
};
})();
Why would someone do this?
I am not sure of the purpose/relevance of $
in this code.
"Doesn't this mean that the function will be inaccessible to anything outside of this block?"
Yes it does.
"Why would someone do this?"
Usually because it contains code for internal use only, though in your example, the function is never invoked.
"I am not of the purpose/relevance of "$" in this code."
No relevance. Just another valid variable character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With