I have just read through the Function return values chapter (https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Return_values) and I have a question about the very last part.
It says
Look at another example of writing error handling into functions. It is generally a good idea to check that any necessary parameters are validated, and that any optional parameters have some kind of default value provided. This way, your program will be less likely to throw errors.
Is this another example meant to use the throw, try, catch statements or something else?