Professional Documents
Culture Documents
4.1 Solid - Lsp.js
4.1 Solid - Lsp.js
{
constructor(width, height)
{
this._width = width;
this._height = height;
}
get area()
{
return this._width * this._height;
}
toString()
{
return `${this._width}×${this._height}`;
}
}
set width(value)
{
this._width = this._height = value;
}
set height(value)
{
this._width = this._height = value;
}
}