text: Arc length from given Angle | function to calculate arc length ; Driver Code
code: function arcLength ( diameter , angle ) { let pi = 22.0 / 7.0 ; let arc ; if ( angle >= 360 ) { document . write ( " " + " " ) ; return 0 ; } else { arc = ( pi * diameter ) * ( angle / 360.0 ) ; return arc ; } } let diameter = 25.0 ; let angle = 45.0 ; let arc_len = arcLength ( diameter , angle ) ; document . write ( arc_len ) ;