Features of ES6 Part 3: Default Parameter Values

added by JavaScript Kicks
8/25/2014 11:25:07 AM

173 Views

If a JavaScript function takes two parameters, we have always had the ability to invoke the function and pass two parameters, or one parameter, or no parameters, or three parameters if we wanted. In cases where we do not pass enough parameters, the author of a function might want to specify a default value instead of working with undefined.


0 comments