Advertisement
kstoyanov

01. Area and Volume Calculator

Oct 4th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function areaAndVolumeCalculator(area, vol, input) {
  2.   const objArr = JSON.parse((input));
  3.   return objArr.map((obj) => ({
  4.     area: Math.abs(area.call(obj)),
  5.     volume: Math.abs(vol.call(obj)),
  6.   }));
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement