JSFiddle - React, Tailwind, and code Playground JavaScript Object.defineProperty(window, "a", {value: false}); var a = true; if(a){ alert(a); }