This Refer
code in module and class enable strict mode by default
browser
globalThisalways refer towindowthisin global within strict or non-strict mode refer towindowthisin non-arrow function refer towindowwithin non-strict mode, refer toundefinedwithin strict modethisin arrow function refer to it parent domainthis- variable declared with 
varin global is seted towindow - variable defined without declaring is seted to 
windowwithin non-strict mode, and will throw error within strict mode 
nodejs
globalThisalways refer toglobalthisin global within strict or non-strict mode refer to plain object {}, notice: not global objectthisin non-arrow function refer toglobalwithin non-strict mode, refer toundefinedwithin strict modethisin arrow function refer to it parent domainthis- variable declared with 
varin global is not seted to global - variable defined without declaring is seted to 
globalwithin non-strict mode, and will throw error within strict mode