11.9 Using Prototypes to Emulate a Class
The class
construct has been around a long time with other languages, but it’s relatively new with JavaScript. Ecma International introduced the class
construct with ECMAScript 6 in 2015. All of today’s standard browsers support the class
construct, except for Microsoft Internet Explorer. With Microsoft’s phaseout of Internet Explorer, you should not count on IE ever supporting the class
construct. Microsoftophiles are in the process of migrating to Edge, but it’ll take a while to finish the transition. In the meantime, you should be familiar with legacy code techniques that implement the object-oriented paradigm without the class
construct. Legacy code is code that is used today even though it’s considered ...
Get Web Programming with HTML5, CSS, and JavaScript 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.