02. Creating constructor function

 264 total views,  1 views today

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= function (selector) {
    
  } 
  window.Q = Q;
}(window));

 

Example : Test Code

‘q’ should be available in window object

alert(window.Q);

 

Try out the code here