There are a total of 7 basic data types supported by JavaScript. Each one of them is briefed up as follows:
Boolean – Represents true and false values
Null – Represents empty, nothing, and unknown type of values
Number – Represents both integer and floating-point values
Object – Used for storing collections of data or more complex entities
String – Represents single-character, multi-character, and alphanumeric values
Symbol – Used for creating unique identifiers for objects
Undefined – Represents value not assigned. If a variable is only declared and not assigned in JS, then it represents the undefined data type