-Annie-

FigureArea

May 24th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function calculateArea(w, h, W, H) {
  2.     "use strict";
  3.    let [s1, s2, s3] = [w * h, W * H, Math.min(w, W) * Math.min(h, H)];
  4.    console.log(s1 + s2 - s3);
  5. }
  6.  
  7. calculateArea(13, 2, 5, 8);
Advertisement
Add Comment
Please, Sign In to add comment