Skip to content

Commit

Permalink
Typo fix: they've --> they're
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsugden committed Oct 23, 2014
1 parent 08c642f commit 58fdd6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types & grammar/ch1.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ JavaScript has seven built-in *types*: `null`, `undefined`, `boolean`, `number`

Variables don't have types, but the values in them do. These types define intrinsic behavior of the values.

Many developers will assume "undefined" and "undeclared" are roughly the same thing, but in JavaScript, they've quite different. `undefined` is a value that a declared variable can hold. "Undeclared" means a variable has never been declared.
Many developers will assume "undefined" and "undeclared" are roughly the same thing, but in JavaScript, they're quite different. `undefined` is a value that a declared variable can hold. "Undeclared" means a variable has never been declared.

JavaScript unfortunately kind of conflates these two terms, not only in its error messages ("ReferenceError: a is not defined") but also in the return values of `typeof`, which is `"undefined"` for both cases.

Expand Down

0 comments on commit 58fdd6e

Please sign in to comment.