class MaterialBox { constructor (width, length, height, weight, material, color) { this._width = width; this._length = length; this._height = height; this._weight = weight; this._material = material; this._color = color; } get width () { return this._width; } set width (width) { this._width = width; } get length () { return this._length; } set length(length) { this._length = length; } get height () { return this._height; } set height(height) { this._height = height; } get material () { return this._material; } set material(material) { this._material = material; } get color () { return this._color; } set color(color) { this._color = color; } get volume() { return this._width * this._length * this._height; } } var birthdayPresent = new Box(20,35,15,0.2,'paper','red'); console.log(birthdayPresent);