December 2014
Beginner
336 pages
6h 32m
English
Programming is all about manipulating data, but what is data? Data is information that we store in our computer programs. For example, your name is a piece of data, and so is your age. The color of your hair, how many siblings you have, where you live, whether you’re male or female—these things are all data.
In JavaScript, there are three basic types of data: numbers, strings, and Booleans. Numbers are used for representing, well, numbers! For example, your age can be represented as a number, and so can your height. Numbers in JavaScript look like this:
5;Strings are used to represent text. Your name can be represented as a string in JavaScript, as can your email address. Strings look like this:
"Hi, I'm a string"; ...