Hang on...
Default Parameters in JavaScript
In this lab, you have to create a function with default parameters using JavaScript. Default parameters in functions are the default values assigned to a parameter when no input is provided. They help in handling the cases when a user doesn't provide certain parameter values to avoid errors and provide a consistent output.
In this lab, you will create a greet
function that takes a name and a greeting parameter. The function should return a greeting message when called with values for both parameters or when only the name is provided, using the default value for the greeting parameter.
Adding your container request
Getting your dedicated container
Connecting to your container
Setting up your editor
Finalizing your playground
TerminalEditorBrowser