3 ms·
I think I would call it nested destructuring with default values.
by chiyc 7y ago
I think I would call it nested destructuring with default values.
- nkrisc 7y agoDestructuring, that rings a bell. Thank you.
- capableweb 7y agoYeah, the trick is basically many things chained together. First is to pass a object to a function instead of position-locked arguments. Second is to default to a empty object. Third is to destruct the object in the function parameter directly. Fourth to supply default destruct values. Fifth is to set the values in the current instance of that class.