Data Types and Variables

Before diving into JavaScript operators, conditionals, and loops, one should understand JavaScript data types and variables. These are building blocks that will be important going forward. Fortunately, JavaScript kept its implementation of data types simple and easy to use, unlike other programming languages. In addition to simple data types, variables are much easier to work with because there are no restrictions on the types of values they can hold.

Numbers

JavaScript's approach to numbers is different from other languages, because every number is treated as a floating-point number. This does not imply that JavaScript does not support integers, octal, hexadecimal, and so on. These numbers are supported at a high level, ...

Get Pure JavaScript 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.