Program to determine focal length of a spherical mirror | Determines focal length of a spherical concave mirror ; Determines focal length of a spherical convex mirror ; Driver Function
function focal_length_concave ( R ) { return R / 2 ; } function focal_length_convex ( R ) { return - ( R / 2 ) ; } let R = 30 ; document . write ( " " + " " + " " + focal_length_concave ( R ) + " " + " " ) ; document . write ( " " + " " + " " + focal_length_convex ( R ) + " " ) ;