Advertisement
Spocoman

02. Triangle Area

Dec 8th, 2021
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function triangleArea(input) {
  2.  
  3.     let side = parseFloat(input[0]);
  4.     let height = parseFloat(input[1]);
  5.     let result = side * height / 2;
  6.     console.log(`${result.toFixed(2)}`)
  7.  
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement