Added note about requiring a single return statement.

This commit is contained in:
Andrew Henry 2020-06-02 13:05:15 -07:00 committed by GitHub
parent 2fa29124bf
commit d6bb1b2a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ JavaScript sources in Open MCT should:
code, and present these in the following order: code, and present these in the following order:
* First, variable declarations and initialization. * First, variable declarations and initialization.
* Secondly, imperative statements. * Secondly, imperative statements.
* Finally, the returned value. * Finally, the returned value. Functions should only have a single return statement.
1. Avoid the use of "magic" values. 1. Avoid the use of "magic" values.
eg. eg.
```JavaScript ```JavaScript