O'Reilly logo

Learning ECMAScript 6 by Narayan Prusty

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 5. Implementing the Reflect API

ES6 introduced a new API, the Reflect API for the object reflection (that is, inspecting and manipulating the properties of objects). Although ES5 already had APIs for the object reflection, these APIs were not well organized and on failure, they used to throw exception. The ES6 Reflect API is well organized and makes it easier to read and write code, as it doesn't throw exceptions on failure. Instead, it returns the Boolean value, representing if the operation was true or false. Since developers are adapting to the Reflect API for the object reflection, it's important to learn this API in depth.

In this chapter, we'll cover:

  • Calling a function with a given this value
  • Invoking a constructor with the prototype ...

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