2 ms·
I suppose it works as a poor man's named argument. You still need to follow the argument order, but the code might be slightly more readable at the expense of c
by jeroenhd 5y ago
I suppose it works as a poor man's named argument. You still need to follow the argument order, but the code might be slightly more readable at the expense of creating random variables all over your code. The expression `a = 5` evaluates to 5 after all, which allows things like `a = b = c = d = 0` or the listed `let a = b = 5` which can cause confusion.
- wonderbore 5y ago> I suppose it works as a poor man's named argument. Sure, if by “poor man” you refer to the guy who has to debug that “code”. Name a variable with an existing or unwritable `window` property and enjoy. Don’t do this stuff, use a linter and a decent editor that can do this automatically.
- conaclos 5y agoMoreover in a ESM, this could lead to an error whether base is not defined.