Default parameters make function parameters more flexible
define it using an assignment to the parameter function(param=1){}
it is used when undefined
is passed
it is not used when a value is given
it is evaluated at run time
it can also be a function
Required Knowledge
- basics (Template strings)
- basics (Arrow functions)
- `let` declaration (Block scope)
Related Katas
Default parameters
- basics
Difficulty Level
BEGINNER
First Published
30 June 2015
Stats
5 tests to solve