About Lesson
Default Parameters
You can assign default values to parameters so that a function works even if no arguments are provided.
Example:
JavaScript
function greet(name = "Guest") {
return "Hello " + name;
}
console.log(greet()); // Output: Hello Guest