diff --git a/types & grammar/ch5.md b/types & grammar/ch5.md index 02c771625..7aa277fe2 100644 --- a/types & grammar/ch5.md +++ b/types & grammar/ch5.md @@ -43,7 +43,7 @@ The `b = a` assignment expression results in the value that was assigned (`18` a **Note:** Technically, it's a little more complex than that. In the ES5 spec, section 12.2 "Variable Statement," the `VariableDeclaration` algorithm actually *does* return a value (a `string` containing the name of the variable declared -- weird, huh!?), but that value is basically swallowed up (except for use by the `for..in` loop) by the `VariableStatement` algorithm, which forces an empty (aka `undefined`) completion value. -In fact, if you've done much code experimenting in your console (or in a JavaScript environment REPL -- read/evaluate/print/loop tool), you've probably seen `undefined` reported after many different statments, and perhaps never realized why or what that was. Put simply, the console is just reporting the statement's completion value. +In fact, if you've done much code experimenting in your console (or in a JavaScript environment REPL -- read/evaluate/print/loop tool), you've probably seen `undefined` reported after many different statements, and perhaps never realized why or what that was. Put simply, the console is just reporting the statement's completion value. But what the console prints out for the completion value isn't something we can use inside our program. So how can we capture the completion value?