In this section I explain in careful details all the types that JavaScript provides, which I already introduced but I’ll repeat here:

Primitive types

  • numbers
  • strings
  • booleans
  • symbol
  • null
  • undefined

Object types

Any value that’s not of a primitive type (a string, a number, a boolean, a symbol, null or undefined) is an object.

Object types have properties and also have methods that can act on those properties.

The difference between the two is that primitive types store one value, while object types store many properties.

Also, pretty big difference is that primitive types are passed by value but object types are passed by reference.

Tip: arrays are not a type in JavaScript. Arrays are objects. I’ll talk more about arrays in their own section later.

Go to the next lesson