Program to calculate length of diagonal of a square | Function to find the length of the diagonal of a square of a given side ; Driver Code
function findDiagonal ( s ) { return Math . sqrt ( 2 ) * s ; } var S = 10 ; document . write ( findDiagonal ( S ) . toFixed ( 6 ) ) ;