There are 6 different kinds of objects:
There are only two data types that are valueless.
The typeof Operator
A single basic data item without any extra characteristics or methods is referred to as a primitive data value.
One of these basic kinds can be obtained by using the typeof operator:
One of two complex types can be returned by the typeof operator:
In the case of objects, arrays, and null, the typeof operation returns "object". For functions, the typeof operator does not return "object".
The Data Type of typeof
An operator's type is not a variable. An operator, that is. There is no data type for the operators (+ - * /). The typeof operation, however, always yields a string (containing the type of the operand).
The constructor Property
Undefined has nothing to do with an empty value. An empty string has a type and a lawful value.
Difference Between Undefined and Null
Null and undefined have the same value but are of distinct types.
The instanceof Operator
If an object is an instance of the supplied object, the instanceof operator returns true.
The void Operator
After evaluating an expression, the void operator returns undefined. With "void(0)," this operator is frequently used to acquire the undefined primitive value (useful when evaluating an expression without using the return value).