bebekutya

calculateRectangleArea

Jun 7th, 2023
988
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1. Task: Calculate the area of a rectangle
  2. Write a function named calculateRectangleArea that takes two parameters, width and height, and returns the area of the rectangle. Test your function with different values.
  3.  
  4. function calculateRectangleArea(width, height) {
  5.     return width * height;
  6. }
  7.  
  8. let width = 7
  9. let height = 8;
  10.  
  11. console.log(calculateRectangleArea(width, height));
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment