can someone explain JAVASCRIPT classes and syntax for me?
i just need an in-depth explanation on what they are and do, and syntax too
3 Replies
Or the MDN docs, it's the heaven of documentations ( for me at least 😁)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
Classes - JavaScript | MDN
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.
Here's a good resource as well:
https://javascript.info/classes