Javascript - Parameters and Arguments
Code Life
By Pierre Marsaa
Making Functions Flexible
This function always greets the same Codémon. To greet another one, you'd need a second function... not very DRY:
↗️
Loading editor...
↶
↷
A parameter is a variable declared between the parentheses. Its value is chosen at each call, so one function can handle every Codémon:
↗️
Loading editor...
↶
↷
Verify