3 ms·
One of the reasons that it's a big deal is because of what it means for functions. It helps make named-parameters more attractive, which can help a lot with cod
by robinson7d 11y ago
One of the reasons that it's a big deal is because of what it means for functions. It helps make named-parameters more attractive, which can help a lot with code maintainability.
Example code: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Function_argument_defaults https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Additionally, it's nice sugar for module loading, for modules that export multiple values.