If you’ve ever debugged a JavaScript application and found yourself wondering why this suddenly refers to the window object instead of your…