Built-in objects

Earlier in this chapter, you came across the Object() constructor function. It's returned when you create objects with the object literal notation and access their constructor property. Object() is one of the built-in constructors; there are a few others, and in the rest of this chapter you'll see all of them.

The built-in objects can be divided into three groups:

  • Data wrapper objects: These are Object, Array, Function, Boolean, Number, and String. These objects correspond to the different data types in JavaScript. There is a data wrapper object for every different value returned by typeof (discussed in Chapter 2, Primitive Data Types, Arrays, Loops, and Conditions), with the exception of "undefined" and "null".
  • Utility objects

Get JavaScript : Object-Oriented Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.