We could pass some parameters in functions, right? Okay. With ES6 it is possible assign default values for them if they are not passed.
When we create a function, we could verify that the values were passed or not, and maybe assign a value to it; something like that.
Now, we could do something like that:
Here you can find an JS Bin with the examples.
Do you like it? Did I write something stupid? Do you want to improve? Open an issue mentioning the post and let’s talk about it.