Chapter 1. Basic JavaScript: Values, Variables, and Control Flow
Inside the computer’s world, there is only data—that which is not data does not exist. All
this data is in essence just sequences of bits and is thus fundamentally alike. Bits are any
kinds of two-valued things, usually described as 0
s and 1
s. Inside the computer, they take forms like a high or low electrical charge, a
strong or weak signal, or a shiny or dull spot on the surface of a CD.
Values
Though made of the same uniform stuff, every piece of data plays its own role. In a JavaScript system, most of this data is neatly separated into things called values. Every value has a type, which determines the kind of role it can play. There are six basic types of values: numbers, strings, ...
Get Eloquent JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.