text: Area of a Hexagon | function for calculating area of the hexagon . ; Length of a side
code: function hexagonArea ( s ) { return ( ( 3 * Math . sqrt ( 3 ) * ( s * s ) ) / 2 ) ; } let s = 4 ; document . write ( " " + hexagonArea ( s ) ) ;