Advertisement
Spocoman

07. Triangle Area

Jan 18th, 2022
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function triangleArea(a, b, c) {
  2.  
  3.     let s = (a + b + c) / 2;
  4.     let area = Math.sqrt(s * (s - a) * (s - b) * (s - c));
  5.     console.log(area);
  6.  
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement