We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92aa3e0 commit 3a427d2Copy full SHA for 3a427d2
10 Days of Javascript/arithmeticOperators.js
@@ -0,0 +1,31 @@
1
+/**
2
+* Calculate the area of a rectangle.
3
+*
4
+* length: The length of the rectangle.
5
+* width: The width of the rectangle.
6
7
+* Return a number denoting the rectangle's area.
8
+**/
9
+function getArea(length, width) {
10
+ let area;
11
+ // Write your code here
12
+ area= length * width;
13
+
14
+ return area;
15
+}
16
17
18
+* Calculate the perimeter of a rectangle.
19
20
21
22
23
+* Return a number denoting the perimeter of a rectangle.
24
25
+function getPerimeter(length, width) {
26
+ let perimeter;
27
28
+ perimeter= 2 * (length+width);
29
30
+ return perimeter;
31
0 commit comments