mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 00:28:25 -05:00
[comments] update 17.4, 17.5 examples to follow 17.2. fixes #430
This commit is contained in:
10
README.md
10
README.md
@@ -573,7 +573,7 @@
|
||||
```javascript
|
||||
// bad
|
||||
var add = new Function('a', 'b', 'return a + b');
|
||||
|
||||
|
||||
// still bad
|
||||
var subtract = Function('a', 'b', 'return a - b');
|
||||
```
|
||||
@@ -1223,8 +1223,10 @@
|
||||
- [17.4](#17.4) <a name='17.4'></a> Use `// FIXME:` to annotate problems.
|
||||
|
||||
```javascript
|
||||
class Calculator {
|
||||
class Calculator extends Abacus {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// FIXME: shouldn't use a global here
|
||||
total = 0;
|
||||
}
|
||||
@@ -1234,8 +1236,10 @@
|
||||
- [17.5](#17.5) <a name='17.5'></a> Use `// TODO:` to annotate solutions to problems.
|
||||
|
||||
```javascript
|
||||
class Calculator {
|
||||
class Calculator extends Abacus {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// TODO: total should be configurable by an options param
|
||||
this.total = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user