Javascript - Destructuring in Function Parameters
Code Life
By Pierre Marsaa
Unpacking Right in the Parameters
A function that receives an object usually starts by reading a few properties from it. That's repetitive:
↗️
Loading editor...
↶
↷
You can destructure in the parameter list itself. The function then receives the properties directly, already named:
↗️
Loading editor...
↶
↷
Verify