mcrosby114

เป็นสมาชิกตั้งแต่
mcrosby114

Recent Docs Activity

ดูกิจกรรมทั้งหมด
หน้า วันที่ ความคิดเห็น

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