JQuery works with $ as a function, I wanted to know how I can make my own function?
How to make a contractor function in JavaScript? For example, I do this:
window.test = (function () {
var test = {
get: function (selector) {
}
};
return test;
}());
(for example) I want to select a canvas element when I call test()
source
share