Chapter 2Variables
Programming is basically the manipulation of data. In order to
manipulate it, though, we first need to store it somewhere. In JavaScript,
variables are the most basic form of data storage. Just like in algebra,
variables are representatives of information we want to work with. Unlike
algebra, though, there’s no restriction to only using letters. We can use
whole words to more accurately describe what we’re dealing with, such as
name, tax, length,
or width. We can also use multiple words combined
together, like firstName, taskList, or
timeToLive. Notice that the first word in each multiword
variable name is all lowercase, while the first letter of each subsequent
word is capitalized. This is known as camel casing, and it is ...
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