You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Why? This is an additional tool to assist in situations where the programmer would be unsure if a variable might ever change. UPPERCASE_VARIABLES are letting the programmer know that they can trust the variable (and its properties) not to change.
3362
3362
- What about all `const` variables?- This is unnecessary, so uppercasing should not be used for constants within a file. It should be used for exported constants however.
3363
-
- What about exported objects?- Uppercase at the top level ofexport(e.g. `EXPORTED_OBJECT.key`) and maintain that all nested properties do not change.
3363
+
- What about exported objects?- Uppercase at the top level ofexport (e.g. `EXPORTED_OBJECT.key`) and maintain that all nested properties do not change.
3364
3364
3365
3365
```javascript
3366
3366
// bad
@@ -3467,7 +3467,7 @@ Other Style Guides
3467
3467
## Events
3468
3468
3469
3469
<a name="events--hash"></a><a name="24.1"></a>
3470
-
- [25.1](#events--hash) When attaching data payloads to events (whether DOM events or something more proprietary like Backbone events), pass an object literal (also known as a "hash") instead of a raw value. This allows a subsequent contributor to add more data to the event payload without finding and updating every handler for the event. For example, instead of:
3470
+
- [25.1](#events--hash) When attaching data payloads to events (whether DOM events or something more proprietary like Backbone events), pass an object literal (also known as a "hash") instead of a raw value. This allows a subsequent contributor to add more data to the event payload without finding and updating every handler for the event. For example, instead of:
3471
3471
3472
3472
```javascript
3473
3473
// bad
@@ -3721,7 +3721,7 @@ Other Style Guides
3721
3721
3722
3722
- [JavaScript: The Good Parts](https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742) - Douglas Crockford
- [Pro JavaScript Design Patterns](https://www.amazon.com/JavaScript-Design-Patterns-Recipes-Problem-Solution/dp/159059908X) - Ross Harmes and Dustin Diaz
3724
+
- [Pro JavaScript Design Patterns](https://www.amazon.com/JavaScript-Design-Patterns-Recipes-Problem-Solution/dp/159059908X) - Ross Harmes and Dustin Diaz
3725
3725
- [High Performance Web Sites: Essential Knowledge for Front-End Engineers](https://www.amazon.com/High-Performance-Web-Sites-Essential/dp/0596529309) - Steve Souders
3726
3726
- [Maintainable JavaScript](https://www.amazon.com/Maintainable-JavaScript-Nicholas-C-Zakas/dp/1449327680) - Nicholas C. Zakas
3727
3727
- [JavaScript Web Applications](https://www.amazon.com/JavaScript-Web-Applications-Alex-MacCaw/dp/144930351X) - Alex MacCaw
0 commit comments