4 ms·
> 2. What's with /* */ ? Doesn't js allow keyword arguments? No.
by gcb0 6y ago
> 2. What's with /* */ ? Doesn't js allow keyword arguments?
No.
- andybak 6y agoI couldn't remember if that was one of the things they fixed with ES6. I wonder if passing in a dict is a good alternative in this case. More syntax clutter but at least the params have some semantic meaning.
- randallsquared 6y agoObject destructuring in the parameter list comes very close to supporting keyword arguments, with only a couple of characters overhead.