Skip to content

Commit

Permalink
update ch1.md in types & grammar
Browse files Browse the repository at this point in the history
fixes two minor grammatical errors
  • Loading branch information
Matthew Murkidjanian committed Feb 16, 2016
1 parent 47ac0b9 commit 110caeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types & grammar/ch1.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function doSomethingCool() {
}
```

`doSomethingCool()` tests for a variable called `FeatureXYZ`, and if found, uses it, but if not, uses its own. Now, if someone includes this utility into their module/program, it safely checks if they've defined `FeatureXYZ` or not:
`doSomethingCool()` tests for a variable called `FeatureXYZ`, and if found, uses it, but if not, uses its own. Now, if someone includes this utility in their module/program, it safely checks if they've defined `FeatureXYZ` or not:

```js
// an IIFE (see "Immediately Invoked Function Expressions"
Expand Down Expand Up @@ -285,7 +285,7 @@ function doSomethingCool(FeatureXYZ) {
}
```

There's lots of options when designing such functionality. No one pattern here is "correct" or "wrong" -- there are various tradeoffs to each approach. But overall, it's nice that the `typeof` undeclared safety guard gives us more options.
There are lots of options when designing such functionality. No one pattern here is "correct" or "wrong" -- there are various tradeoffs to each approach. But overall, it's nice that the `typeof` undeclared safety guard gives us more options.

## Review

Expand Down

0 comments on commit 110caeb

Please sign in to comment.