[comments] update 17.4, 17.5 examples to follow 17.2. fixes #430

This commit is contained in:
Harrison Shoff
2015-07-23 10:28:28 -07:00
parent bd98ed3b28
commit 63bf905ed6

View File

@@ -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;
}