Skip to content

Commit d002872

Browse files
HerringtonDarkholmegoatslacker
authored andcommitted
add semicolons
1 parent e500693 commit d002872

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -550,21 +550,21 @@
550550
// ...
551551
}
552552
```
553-
553+
554554
- Don't put side effect into default parameter
555-
556-
> it introduces confusion and subtlety. Arguments in function call are evaluated at call site, but default parameters are not evaluated at define site.
555+
556+
> it introduces confusion and subtlety. Arguments in function call are evaluated at call site, but default parameters are not evaluated at define site.
557557
558558
```javascript
559-
var b = 1
559+
var b = 1;
560560
// bad
561561
function count(a = b++) {
562-
console.log(a)
562+
console.log(a);
563563
}
564-
count() // 1
565-
count() // 2
566-
count(3) // 3
567-
count() // 3
564+
count(); // 1
565+
count(); // 2
566+
count(3); // 3
567+
count(); // 3
568568
```
569569
570570

0 commit comments

Comments
 (0)