About Lesson
In this session we will create our constructor function and attach to the global window object.
Step 2: Function definition and window
(function (window, undefined) {
const Q = function (selector) {
}
window.Q = Q;
}(window));
Example : Test Code
‘q’ should be available in window object
alert(window.Q);