Merge pull request #3154 from tangjm/patch-1

This commit is contained in:
Ilya Kantor 2022-08-27 18:15:33 +03:00 committed by GitHub
commit 93127698f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,7 +265,7 @@ function showMessage(from, text) {
### Alternative default parameters ### Alternative default parameters
Sometimes it makes sense to assign default values for parameters not in the function declaration, but at a later stage. Sometimes it makes sense to assign default values for parameters at a later stage after the function declaration.
We can check if the parameter is passed during the function execution, by comparing it with `undefined`: We can check if the parameter is passed during the function execution, by comparing it with `undefined`: