Summary

In this chapter, we focused on understanding ES6 classes. ES6 classes give formal support to the common JavaScript pattern of simulating class-like inheritance hierarchies using functions and prototypes. They are syntactic sugaring over prototype-based OO, offering a convenient declarative form for class patterns which encourage interoperability. ES6 classes offer a much nicer, cleaner, and clearer syntax for creating these objects and dealing with inheritance. ES6 classes provide support for constructors, instance and static methods, (prototype-based) inheritance, and super calls.

So far, JavaScript lacked one of the most basic features - modules. Before ES6, we wrote modules using either CommonJS or AMD. ES6 brings modules into JavaScript officially. In this chapter, we took a detailed look at how modules are used in ES6.

The next chapter focuses on another interesting addition to ES6 - proxies and promises.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.15.1