O'Reilly logo

JavaScript for Sound Artists by Steve Leonard, William Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required