Niraj Bajaj

Niraj Bajaj

@nirajbajaj.dev

::explorer

4 followers8 following25 posts

View full thread

Here was my solution: Array.prototype.last = function () { if (this.length === 0) return -1; return this[this.length - 1]; }; (4/5) #JavaScript #DSA #LeetCode

What made this special wasn’t the code, but realizing I reached for this instinctively and correctly. That’s what good teaching does. Thank you Kyle Simpson. (5/5)

The task was to add a last() method to Array.prototype. My immediate intuition was to use this, because the method is reused and invoked at the call site. Runtime-bound, call-site-dependent behavior fits perfectly here. (2/5)

That intuition didn’t come from nowhere. It came directly from reading You Don’t Know JS Yet: this & Object Prototypes by Kyle Simpson. (3/5)

View full thread

Big thanks to Per Borgen for the course 🙌 Next up: The Frontend Developer Path. Excited to see what’s coming! (5/5) #WebDevelopment #Frontend #HTML #CSS #LearningInPublic #BuildInPublic

Loved Scrimba’s interactive, project-based approach. Built things like a digital business card, a hometown landing page, and a studio landing page. (3/5)

View full thread

Big takeaway: the right mix of learning resources can make all the difference when learning to code. What books or resources helped you most when learning JavaScript? (8/8) #JavaScript #LearningInPublic #WebDev

View full thread

When I later moved to Eloquent JavaScript, something clicked. Kyle Simpson’s technical depth + Marijn Haverbeke’s explanations and analogies complement each other incredibly well. (6/8)

View full thread

To properly absorb that depth, I needed help building the right mental models, so I paired it with JavaScript All-in-One For Dummies (Chris Minnick). (4/8)

View full thread

let soonBackEnd = ["Node.js", "PHP"]; console.log("Back End: " + soonBackEnd[0]); for (let i = 1; i < soonBackEnd.length; i++) { console.log(" " + soonBackEnd[i]); } console.log(""); (3/n)

let soonDataBase = ["MySQL", "MongoDB"]; console.log("Database: " + soonDataBase[0]); for (let i = 1; i < soonDataBase.length; i++) { console.log(" " + soonDataBase[i]); } (4/n)

let frontEnd = ["HTML", "CSS", "JavaScript", "React"]; console.log("Front End: " + frontEnd[0]); for (let i = 1; i < frontEnd.length; i++) { console.log(" " + frontEnd[i]); } console.log(""); (2/n)

You are up to date.