JavaScript Basics

Let’s learn the basics of JS data types.

Data types

JavaScript has three primitive datatypesstring, number, and boolean. There are five reference datatypesObject, Array, Function, Date, and RegExp. Arrays, functions, dates, and regular expressions are special types of objects, but conceptually, dates and regular expressions are primitive data values and happen to be implemented in the form of wrapper objects.

Below, we have an example of JS data types:

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy