Cover by Marijn Haverbeke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required