JavaScript Fundamentals -- Primitive Types

Primitive Types Explanation


There are 6 primitive types in JavaScript:

  1. string: a sequence of characters
  2. number: a numerical value, including whole numbers as well as numbers with decimals
  3. boolean: true/false values
  4. undefined: the absence of a value
  5. null: the intentional absence of a value
  6. Symbol: provides unique identifiers for variables

There is one more type in JavaScript, object, but it's not considered a primitive type. We'll talk about it later in the course.

For more information on these primitive types, check out this blog post.