Advertisement
desito07

Triangle Area

May 26th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function triangleArea(side1, side2, side3) {
  2. let n =
  3. (1 / 4) *
  4. Math.sqrt(
  5. (side1 + side2 + side3) *
  6. (side2 + side3 - side1) *
  7. (side1 + side3 - side2) *
  8. (side1 + side2 - side3)
  9. );
  10. console.log(n);
  11. }
  12. triangleArea(2, 3.5, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement