What are JavaScript classes?
Templates for creating objects
When would you want to use a class?
inherit properties/functions
How do you declare a class?
class ‘name’ (parameters) {
}
How do you inherit from another class?
class ‘name’ extends ‘inherited class’
Why would you want to inherit from another class?
general or useful functions from another class
How do you add methods and properties to a class?
class ‘name’ (parameters) {
this.class = class;
function ‘name’ () => {
}