6  Objects

So far, we discussed five of JavaScript’s six data types. These are string, number, Boolean, undefined, and null. These are called primitive data types. Anything that is not a primitive data type is of the object data type. In the previous chapter, you learned about functions, which are of the object data type. In this chapter, you will learn how to program using object literals, which are also of the object data type.

JavaScript Data Types

The JavaScript data types are:

  • String

  • Number

  • Boolean

  • Undefined

  • Null

  • Object

The object data type includes functions, arrays, and object literals. Arrays and functions have already been explored, so here is a general definition of object literals: Object literals are a collection of ...

Get JavaScript for Sound Artists now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.