From 070e1bceab0bbc2d927dfccdf114f90a16c4b569 Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Wed, 6 Aug 2014 19:24:10 -0700 Subject: [PATCH] types+grammar: removing 'void' in ch1 code example in favor of ch2 coverage, closes #167 --- types & grammar/ch1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types & grammar/ch1.md b/types & grammar/ch1.md index 36ef02d3f..0441d3212 100644 --- a/types & grammar/ch1.md +++ b/types & grammar/ch1.md @@ -146,11 +146,13 @@ var a; typeof a; // "undefined" var b = 42; +var c; // later -b = void 0; +b = c; typeof b; // "undefined" +typeof c; // "undefined" ``` It's tempting for most developers to think of the name "undefined" and think of it as a synonym for "undeclared". However, in JS, these two concepts are quite different.