Advertisement
Spocoman

07. Triangle Area

Jan 20th, 2022
80
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. }
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement