DEV Community

Discussion on: Book Club: Eloquent Javascript - Chapter 1

Collapse
 
peerreynders profile image
peerreynders • Edited

You may be interested in undefined vs. null revisited.

In Chapter 2 pay particular attention to:

When a binding points at a value …
.
You should imagine bindings as tentacles, rather than boxes. They do not contain values; they grasp them—two bindings can refer to the same value.

It's a subtlety that lots of people overlook about the language and the reason why that section prefers the term binding over the more commonly used variable.

MDN: Primitive:

All primitives are immutable, i.e., they cannot be altered. It is important not to confuse a primitive itself with a variable assigned a primitive value. The variable may be reassigned a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered.

Collapse
 
kharouk profile image
Alex Kharouk • Edited

These are some fantastic follow-ups, thanks for sharing. I'm almost done chapter two and I have noticed how the author particularly references bindings. It's a good way of looking at it.