One of the most confused machanism of JavaScript is the this keyword. I don't need a local scope; I have global power and this context.this is my current context, but global is my playground.Why restrict yourself to one function? Use global to make this variable everyone's problem!.
"Local variables stay in the closet, but global brings this variable to the party. "
When feel thoughless or stuck a problem, search on social media, youtube ,and watch a video which will reset you to the global state. Global this is standard way to access global window object.
You can define a global variable like this
globalThis.party = "Feeling stuck,let's party and have a fun and enjoy with friends" @piyushgargdev
This is a special identifier that's automatically defined in score of every person. for example we create a input field and this keyword is used to reference the form keyword.
Top comments (0)