It is called default function parameters . It allows formal parameters to be initialized with default values if no value or undefined is passed. NOTE: It wont work with Internet Explorer or older browsers.
Is it possible to assign a default value to a function parameter in the function definition?
It is called default function parameters . It allows formal parameters to be initialized with default values if no value or undefined is passed. NOTE: It wont work with Internet Explorer or older browsers.