O'Reilly logo

Mastering JavaScript High Performance by Chad R. Adams

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

Chapter 6. Constructors, Prototypes, and Arrays

Now that we are getting comfortable with optimizing JavaScript without a linter or an IDE testing our code for us, it's time to dive into more complex optimization, specifically when it comes to memory and object creation. In this chapter, we're going to take a look at optimizing larger JavaScript code bases using constructors, prototypes, and arrays.

We are planning to cover the following topics in the chapter:

  • Building with constructors and instance functions
  • Alternate constructor functions using prototypes
  • Array performance

Building with constructors and instance functions

Here, we will learn about building with constructors and instance functions in the following ways:

A quick word

Depending on skill ...

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