The pros and cons of passing parameters object?

Faced with the need to transfer the function of 5+ string and parameters object. I thought, and began to transfer only the object from which to pull the necessary function values and object data.

function (a,b,c,d,e,Object) {...};
vs.
function ({
 a: a,
 b: b,
......
 obj: Object[]
}) {...};


Now arrive with a heady feeling that if parameters are more than three items — go to the object.

What are the explicit and implicit advantages and disadvantages in the transfer of parameters the object you are aware of?
July 8th 19 at 11:55
4 answers
July 8th 19 at 11:57
Solution
No cons, all right, you thought, usually with four or more parameters used for the object to pass parameters.
July 8th 19 at 11:59
Solution
Functionality - will you throw sneaker
Hoopsnake - will enjoy

The downside is that if you're only talking about the object for transmission to a function, it's weird.
If your object passes through your whole code, then, fine

And so, the probability of errors of the blue, just because somnitelno facilities
What does functionality will throw sneaker, here is an example of redux, a fully functional style, but all the action an ordinary object, not a set of two infinity settings. - johnson_Rutherfo commented on July 8th 19 at 12:02
:
>If your object passes through your whole code, then, fine - marilyne_Roh commented on July 8th 19 at 12:05
object of action does not pass through all my code, it's not a condition, on the contrary, it is specially formed only to be transferred to reducer and there processed. - johnson_Rutherfo commented on July 8th 19 at 12:08
July 8th 19 at 12:01
Quote from Matt Zandstra . .. assign properties objectschema bad taste in OOP and almost never used.
EEEEEE....

"$product1->newProperty = "New property";
But it should be noted that this method of assigning properties to objects is considered bad form in object-oriented programming and is almost never used".

I think it's all about a bit more. - johnson_Rutherfo commented on July 8th 19 at 12:04
: Yes other but it seemed to me that the themes resonate, I just just this place read )) - marilyne_Roh commented on July 8th 19 at 12:07
July 8th 19 at 12:03
Absolutely fine, use es2015(16)
let a = 22;
let b = 33;
let d = 44;

function fun({a, b, c}) {
//...
}

fun({a, b, c: d});

Find more questions by tags OOPJavaScript