Changes between Version 31 and Version 32 of WebInspectorCodingStyleGuide
- Timestamp:
- Jun 29, 2020, 3:22:47 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebInspectorCodingStyleGuide
v31 v32 108 108 In cases where the return value is used and the single expression is a constant ("foo"), a variable (foo), a member (this.foo), or evaluates to a Promise, use option (2). Never use braces though, because implicit return only works if there are no braces around the single expression. 109 109 110 In cases where the expression computes a value (a + 42) or performs a side effect (++a), prefer option (4).110 In cases where the expression computes a value (a + 42) or performs a side effect (++a), prefer option 5. 111 111 In some sense, curly braces are a signpost to the effect of "careful, we do actual work here". 112 112