wencaizhang

Type of

# JavaScript Fundamental
Easy
The
operator is a powerful tool used to determine the data type of a variable.
For instance:
  • will return "string".
  • will return "number".
  • will also return "number".
  • will return "boolean".
  • will return "object".
  • will return "object".
  • will return "object".
  • will return "function".
  • will return "undefined".
  • will return "object".
JavaScript's data types can be divided into two main categories based on the values they hold:
Data types that can contain values:
JavaScript provides several object types including
,
,
,
,
, and
.
Data types that cannot contain values:
A primitive data value is a straightforward value with no extra properties or methods and is not an object. They are unchangeable, meaning they can't be modified. There are seven primitive data types: