diff --git a/j8Jgw3/XgxUIi.js b/j8Jgw3/XgxUIi.js new file mode 100644 index 0000000..7672e33 --- /dev/null +++ b/j8Jgw3/XgxUIi.js @@ -0,0 +1,9 @@ +// Function to calculate the area of an equilateral triangle +function equilateralTriangleArea(sideLength) { + return (sideLength * sideLength * Math.sqrt(3)) / 4; +} + +// Example usage: +const sideLength = 5; // Replace with your desired side length +const area = equilateralTriangleArea(sideLength); +console.log(`The area of the equilateral triangle is ${area}`);