Find the Diameter or Longest chord of a Circle | Function to find the longest chord ; Get the radius ; Find the diameter
function diameter ( r ) { document . write ( " " + " " + 2 * r ) ; } var r = 4 ; diameter ( r ) ;