Skip to content

Commit 60f2cf6

Browse files
committed
Add some lines of code to calculate the area of a rectangle
1 parent 8f3d6cf commit 60f2cf6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

prep/example.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Write a function that will calculate the area of a rectangle
2+
//given its width and height
3+
4+
let width = 3;
5+
let height = 4;
6+
7+
function calculateArea(width , height) {
8+
const area = width * height;
9+
return area;
10+
}
11+
12+
const result = calculateArea(3,4+8);
13+
console.log(result);

0 commit comments

Comments
 (0)