Area of hexagon with given diagonal length | Function to calculate area ; Formula to find area ; Driver Code
function hexagonArea ( d ) { return ( 3 * Math . sqrt ( 3 ) * Math . pow ( d , 2 ) ) / 8 ; } let d = 10 ; document . write ( " " + hexagonArea ( d ) . toFixed ( 3 ) ) ;