Summary

In this chapter, we looked at two important concepts. ES6 proxies are useful meta programming constructs used to define custom behavior for fundamental operations (for example, property lookup, assignment, enumeration, function invocation, and so on). We looked at how to use handlers, traps, and proxy targets to intercept and modify the default behavior of operations. This gives us very powerful meta programming capabilities earlier lacking in JavaScript.

The other important construct we discussed in this chapter was ES6 promises. Promises are important because they make asynchronous programming constructs easier to work with. A promise acts as a proxy for a value not necessarily known when the promise is created. This lets asynchronous ...

Get Object-Oriented JavaScript - Third Edition 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.