mcrosby114

Membro desde
mcrosby114

Atividade recente na documentação

Ver toda a atividade
Página Data Comentário

Rest parameters


Technically we're referring to the formal parameter of a function in its declaration -- not the argument. The argument is not what gets prefixed with "...". An argument is merely what the caller supplies and what gets assigned to the parameter.

Spread syntax


In the example illustrating how you can't mimic Object.assign(..), the actual output differs from the comments. Also, would this not mimic Object.assign(): const merge = ( ...objects ) => objects.reduce( (obj, merged) => ( { ...obj, ...merged } ), { } );

Spread syntax