Javascript - Parameters and Arguments
📖 Read the lesson
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...
↶
▶️ Run
↷
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...
↶
▶️ Run
↷
Verify