type of variable in javascript class contructior code example
Example 1: es6 class example
class Polygon {
constructor(height, width) {
this.height = height;
this.width = width;
}
}
Example 2: es6 class example
var Polygon = class {
constructor(height, width) {
this.height = height;
this.width = width;
}
}