--

Hi Ignas, I see your point, and when I write a function like “roundNumber” that will only ever take two parameters, then I think about skipping the object. But the reality is I’ve had to refactor functions like that so many times to add another parameter, and I hate having to touch 10+ files on my PRs because the API changed. So I always pass the object with its clearly labeled parameters, and I’m happier for it.

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

No responses yet