⊗jsOpPrRc 54 of 60 menu

Rectangle Class in OOP in JavaScript

Create a class Rectangle, in which the width and height of the rectangle will be written in the properties.

In the Rectangle class, create a getSquare method that will return the area of ​​this rectangle.

In the Rectangle class, create a getPerimeter method that will return the perimeter of this rectangle.

In the Rectangle class, create a getRatio method that will return the area divided by the perimeter.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline