javascript es5 class code example
Example: javascript es6 class
class MyClass {
constructor() {
this.answer = 42;
}
}
const obj = new MyClass();
obj.answer; // 42
class MyClass {
constructor() {
this.answer = 42;
}
}
const obj = new MyClass();
obj.answer; // 42