DEV Community

Discussion on: List of Variables vs. Object

Collapse
 
tomekbuszewski profile image
Tomek Buszewski

Okay, and what's the conclusion? Which notation is better in your opinion? :)

I use object as a parameter when the number of variables is greater than two.

Collapse
 
miku86 profile image
miku86

Tomek, great question.

I use object as a parameter when the number of variables is greater than one. Especially for using async stuff I don't want to care about the correct order.
Most of the time I also add some default parameters into the function declaration.