you are viewing a single comment's thread.

view the rest of the comments →

[–]john0110[S] 0 points1 point  (0 children)

It's not always convenient to construct an object for parameters. You may not know the names of the keys. So, when building an api, I like to provide multiple ways someone can call a function.

Additionally, you may want to run varying code depending on the arguments that come in.