JSFiddle - React, Tailwind, and code Playground
JavaScript
(function(window) {
window = null;
alert("Local function scope window identifier isn't window object anymore: " + window);
})(window);
// Even if you self-invoked the function and window identifier was reused inside the whole function, in the global scope window identifier holds the window object yet!
alert("Global scope window var is still window object: " + window);