Skip to content

Commit

Permalink
Merge pull request getify#684 from simonebrunozzi/patch-1
Browse files Browse the repository at this point in the history
Update ch2.md
  • Loading branch information
getify committed Mar 20, 2016
2 parents 704f828 + fb825a2 commit a5b49a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion up & going/ch2.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ a = { b: "c" };
typeof a; // "object"
```

The return value from the `typeof` operator is always one of six (seven as of ES6!) string values. That is, `typeof "abc"` returns `"string"`, not `string`.
The return value from the `typeof` operator is always one of six (seven as of ES6! - the "symbol" type) string values. That is, `typeof "abc"` returns `"string"`, not `string`.

Notice how in this snippet the `a` variable holds every different type of value, and that despite appearances, `typeof a` is not asking for the "type of `a`", but rather for the "type of the value currently in `a`." Only values have types in JavaScript; variables are just simple containers for those values.

Expand Down

0 comments on commit a5b49a8

Please sign in to comment.