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 0s and 1s. 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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access