Default arguments in ES6, put simply: I’m a huge fan.
I wanted to document a few of the ways I use default args and how they’ve made my old ES5 workarounds go away in favour of a much more elegant code design.
This is a quick tip post, but there’s a tonne of “cool” syntax features in ES6, but when you dig around a little more you’ll find a few nicities knocking around (which I tend to find by playing in devtools’ console).
As I slowly join the masses in using ES6 to a fuller extent (than my previous Promise only-ES6), I’m discovering new and interesting ways to play with the language. I’m even learning that some stuff just didn’t work the way I thought.