Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function triangleArea(sideA, sideB, sideC) {
- let semiPerimeter = (sideA + sideB + sideC) / 2;
- let areaOfTriangle = Math.sqrt(semiPerimeter * (semiPerimeter - sideA) * (semiPerimeter - sideB) * (semiPerimeter - sideC));
- console.log(areaOfTriangle);
- }
- triangleArea(2, 3.5, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement