Summary
In this chapter, you learned a lot about the basic building blocks of a JavaScript program. Now you know the following primitive data types:
- Number
- String
- Boolean
- Undefined
- Null
You also know quite a few operators, which are as follows:
- Arithmetic operators:
+
,-
,*
,/
, and%
- Increment operators:
++
and-
- Assignment operators:
=
,+=
,-=
,*=
,/=
, and%=
- Special operators:
typeof
anddelete
- Logical operators:
&&
,||
, and!
- Comparison operators:
==
,===
,!=
,!==
,<
,>
,>=
, and<=
- The ternary operator:
?
Then you learned how to use arrays to store and access data, and finally you saw different ways to control the flow of your program using conditions (if...else
or switch
) and loops (while
, do...while
, for
, and for...in
).
This is quite a bit of information; ...
Get Object-Oriented JavaScript - Third Edition 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.