Classes
Classes are a template for creating objects. They encapsulate data with code to work on that data. Classes in JS are built on prototypes but also have some syntax and semantics that are unique to classes.
Read More at MDN DocsView SpecSafe to Use
Classes
is considered safe to use.
It’s supported by 94% of global browsers.
Browsers
Servers
Version Breakdown
Full Support
No Support, Feature Removed
Full Support
Strict mode is required.
Full Support
No Support, Feature Removed
Full Support
Strict mode is required.
Full Support
Full Support
Full Support
Full Support
No Support
Full Support
This feature is behind the --harmony
runtime_flag
This feature is behind the --use_strict
runtime_flag
Full Support
Full Support
No Support, Feature Removed
Full Support
Strict mode is required.
Full Support
No Support, Feature Removed
Full Support
Strict mode is required.
Full Support
Full Support
Full Support
No Support, Feature Removed
Full Support
Strict mode is required.
Full Support
No Support, Feature Removed
Full Support
Strict mode is required.
See Also
- Using classes
class
class
expression- Functions
- ES6 In Depth: Classes on hacks.mozilla.org (2015)