@@ -118,9 +118,9 @@ const locations = ['Austin', 'New York', 'San Francisco'];
118
118
locations .forEach ((l ) => {
119
119
doStuff ();
120
120
doSomeOtherStuff ();
121
- ...
122
- ...
123
- ...
121
+ // ...
122
+ // ...
123
+ // ...
124
124
// Wait, what is `l` for again?
125
125
dispatch (l);
126
126
});
@@ -132,9 +132,9 @@ const locations = ['Austin', 'New York', 'San Francisco'];
132
132
locations .forEach ((location ) => {
133
133
doStuff ();
134
134
doSomeOtherStuff ();
135
- ...
136
- ...
137
- ...
135
+ // ...
136
+ // ...
137
+ // ...
138
138
dispatch (location);
139
139
});
140
140
```
@@ -213,7 +213,7 @@ lot of arguments.
213
213
** Bad:**
214
214
``` javascript
215
215
function createMenu (title , body , buttonText , cancellable ) {
216
- ...
216
+ // ...
217
217
}
218
218
```
219
219
@@ -227,7 +227,7 @@ const menuConfig = {
227
227
}
228
228
229
229
function createMenu (menuConfig ) {
230
- ...
230
+ // ...
231
231
}
232
232
233
233
```
@@ -335,7 +335,7 @@ function tokenize(code) {
335
335
const tokens = [];
336
336
REGEXES .forEach ((REGEX ) => {
337
337
statements .forEach ((statement ) => {
338
- tokens .push ( // ... );
338
+ tokens .push ( /* ... */ );
339
339
})
340
340
});
341
341
@@ -345,7 +345,7 @@ function tokenize(code) {
345
345
function lexer (tokens ) {
346
346
const ast = [];
347
347
tokens .forEach ((token ) => {
348
- ast .push ( // ... );
348
+ ast .push ( /* ... */ );
349
349
});
350
350
351
351
return ast;
@@ -441,7 +441,7 @@ function writeForumComment(subject, body) {
441
441
** Good** :
442
442
``` javascript
443
443
function writeForumComment (subject = ' No subject' , body = ' No text' ) {
444
- ...
444
+ // ...
445
445
}
446
446
447
447
```
@@ -683,7 +683,7 @@ const totalOutput = programmerOutput
683
683
** Bad:**
684
684
``` javascript
685
685
if (fsm .state === ' fetching' && isEmpty (listNode)) {
686
- // / ...
686
+ // ...
687
687
}
688
688
```
689
689
@@ -737,7 +737,7 @@ just do one thing.
737
737
** Bad:**
738
738
``` javascript
739
739
class Airplane {
740
- // ...
740
+ // ...
741
741
getCruisingAltitude () {
742
742
switch (this .type ) {
743
743
case ' 777' :
@@ -754,25 +754,25 @@ class Airplane {
754
754
** Good** :
755
755
``` javascript
756
756
class Airplane {
757
- // ...
757
+ // ...
758
758
}
759
759
760
760
class Boeing777 extends Airplane {
761
- // ...
761
+ // ...
762
762
getCruisingAltitude () {
763
763
return getMaxAltitude () - getPassengerCount ();
764
764
}
765
765
}
766
766
767
767
class AirForceOne extends Airplane {
768
- // ...
768
+ // ...
769
769
getCruisingAltitude () {
770
770
return getMaxAltitude ();
771
771
}
772
772
}
773
773
774
774
class Cessna extends Airplane {
775
- // ...
775
+ // ...
776
776
getCruisingAltitude () {
777
777
return getMaxAltitude () - getFuelExpenditure ();
778
778
}
0 commit comments