return object with only some parameters javascript code example
Example: js use param object or multiple
Like many of the others, I often prefer passing an options object to
a function instead of passing a long list of parameters, but it
really depends on the exact context.
I use code readability as the litmus test.