Re:jQuery 4.1.0
by franciscop on Tuesday November 17, 2026 @10:58PM
(#50541704)
This is one of the first things I learned in programming. A friend back in University showed me a bit of his code (neither of us were in CS), and I was like why are you returning `this`? Then he showed me this chaining. I only found it a "cool trick" at the moment, who'd told me that I'd end up loving it the more I learned programming. I've made two of my main libraries, `umbrellajs` and a plumbing one called `swear` (chaining but for promises, some chaining syntax sugar on top of promises basically), based on this. I stopped doing it too much in recent years, but still it's amazing.
[ Parent
| on HN ]
There are no comments on this comment yet.