I’ve written a good amount of JavaScript before, but I want to get a deeper understanding of the language. I’m guessing it will take a few dozen posts, but who knows really? I’m also hoping this will be a readable series of posts by the end. So without further ado.. :

Language types in JavaScript

Each value used in a JavaScript program is of one of the following types:

Primitive values:

  • undefined
  • null
  • boolean
  • string
  • number

Built-in objects (not showing error objects):

  • Object
  • Function
  • Array
  • String
  • Boolean
  • Number
  • Math
  • Date
  • RegExp
  • JSON

In reality, primitive boolean, string and number values will be wrapped in built-in Boolean, String and Number objects when you are working with them. So for instance I don’t think you will ever access raw 64-bit doubles, but instead always be working with numbers through their “Number” wrapper object.

Filling out the list of built-in objects there are the built-in error objects:

  • Error
  • EvalError
  • RangeError
  • ReferenceError
  • SyntaxError
  • TypeError
  • URIError