ayushjjainn.hashnode.devwindow, global, globalThis: Same Hero. Three Names. One Identity.Think about how Marvel does it. Tony Stark is Iron Man in the MCU. In the comics, the same character shows up in a completely different story with a different suit and a different world around him. Sa22h ago·11 min read
ayushjjainn.hashnode.devTwo Ways to Write a Function in JavaScript. One of Them Has a Secret.It was past midnight and I was trying to fix a bug in something I had been building. At some point while moving code around I accidentally called a function above the line where I had written it. Expe23h ago·8 min read
ayushjjainn.hashnode.devNobody Told Me OOP Was Just About Keeping Things Together. That One Sentence Would Have Saved Me Weeks.The first time someone mentioned OOP in a tutorial I was watching, I paused the video and googled it. The results were full of words like "paradigm," "abstraction," "polymorphism," "inheritance." I cl3d ago·10 min read
ayushjjainn.hashnode.devOne Project Turned Into a Mess. That's How I Found Out About Objects.A while back I was building a small movie watchlist app. Nothing fancy. Just something that stored a list of movies I wanted to watch, with the title, the year it came out, and a rating out of 10 afte3d ago·11 min read
ayushjjainn.hashnode.devControl Flow in JavaScript: If, Else, and Switch ExplainedWhen I first started writing JavaScript, my programs had a problem I didn't even recognise as a problem. Every line I wrote would run. Every single time. No matter what. I wrote a program that was sup3d ago·15 min read