DEV Community

loading...

Discussion on: Default Function Parameters (ES6)

Collapse
runosaduwa profile image
Runo-saduwa Author

Good question!!, the same thing applies. The only difference in this case is that you are explicitly setting your argument to be undefined. The trick here is, whether you specify undefined explicitly or allow JavaScript to do it for you implicitly, the important thing to note is that once JavaScript reads undefined it uses the default parameters