js call a class code example
Example 1: es6 class example
var Polygon = class {
constructor(height, width) {
this.height = height;
this.width = width;
}
}
Example 2: javascript classes
let Person = class {
constructor(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}