The subclass relation imposes a hierarchy relation on the set of all classes. JavaScript 2.0 currently does not support multiple inheritance, although this is a possible future direction. If multiple inheritance were allowed, the subclass relation would impose a partial order on the set of all classes. An interface is also a template for creating similar values, often called objects or instances. These instances generally share characteristics such as common methods and properties.
Every interface is also a type and a value.
When used as a type, an interface represents the set of all possible instances of that interface. Classes and intefaces differ when it comes to inheritance. C may inherit from an interface I . In this case, however, C is not a subtype of I . On the other hand, an instance c of C may be coerced to type I , which creates an instance i of I .