69.6k views
5 votes
Why are default parameters useful? *This is JavaScript*

1 Answer

11 votes

Answer:

It helps in setting a different default value.

Step-by-step explanation:

They allow you to initialize named parameters with default values if no values are passed into the function.

User Kathara
by
3.4k points