In D.Flanagan's 'Javascript the Definite Guide' there's an example:
var x = 1;
console.log(delete globalThis.x)
When I console log this code in node v14.15.1 then instead of false I get true. When console logging globalThis then x is not there. If I declare x without var or let then it becomes a part of global object. Funnily when I ran this code here on Stack Overflow then it behaved as Flanagan explained.
Can somebody please explain to me why global variables declared with var/let won't get a part of globalThis in my environment? Is this because the version of Node I'm using or something else?