RSRobince Studio

Classes

A class is a blueprint for creating many objects of the same kind.

You create an object from a class using the new keyword. Each object is called an instance.

class Dog {
  bark() {
    return "Woof";
  }
}
Class names are written in PascalCase by convention, like Dog or BankAccount.
Try it yourself

Loading editor…