4 ms·
> By immediately destructuring the parameters object Please don't try to use fancy terms to impress. That's not what destructuring is. This appears to have b
by pwdisswordfish0 5y ago
> By immediately destructuring the parameters object
Please don't try to use fancy terms to impress. That's not what destructuring is.
This appears to have been hand selected and placed into the second-chance pool. My question is why? This is such a poorly written article in so many other regards, which wouldn't be bad if it contributed something worthwhile, but it's all to document what is not a novel or noteworthy pattern.
- presentation 5y agoUm do you write JavaScript? Because that’s what it’s called in JavaScript. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Why so negative, I’ve had this thought before and found it reassuring that I’m not the only one.
- Tcepsa 5y agoThat does, in fact, appear to be a nearly textbook example of JavaScript object destructuring. See the Mozilla Developer reference site[0], specifically the "Unpacking fields from objects passed as a function parameter" section. (Edited for clarity) [0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#object_destructuring https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- deleted 5y ago[deleted]