Type the "this" keyword into the JavaScript web console of your favorite browser (hopefully Chrome or Firefox) and explain what is returned.


this  // the window object is returned

The global object is created when the JavaScript interpreter starts and it creates global properties (i.e. NaN), global functions (i.e. parseInt()), built-in constructor functions (Array()), and global objects (Math). The global object for client-side JavaScript is called window.


© 2017