JavaScript Data Types

js_datatypes.html

About JavaScript

JavaScript is the most widely used programming language on the web and is easy to learn.

In this chapter, we will cover the most important functions of JavaScript, but not go into depth. If you want to know more, take a look at the references.

Data Types

There are 6 primitive datatypes:

Variables: const and let

There are 3 keywords for declaring variables in JS:

Rule of thumb: Always use const over let unless it is really not possible (for example, let is useful as a loop index).

Objects

Objects are used to store key-value pairs. They can have properties and methods.

More about JS