1

From what I understood from "this" explanation is that it returns "where" it got executed. So if it gets executed inside an object it returns that object. And if it gets executed in the global scope, it returns window object in the browser console and the global object in node. However, I am trying to console.logging "this" but it returns an empty object instead of the global one. console.log(this) in Vscode

ModyDz
  • 115
  • 8

0 Answers0