--

Thanks for your comment.

Take another look at the code example. You'll notice that the issue is that, while not all arguments are mandatory, I needed to pass in an optional argument that was the last argument in the function definition.

A destructured object would avoid this issue, enforce descriptive naming conventions, and allow me to pass the parameters in any order.

--

--

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.

Responses (1)