Program to find Length of Bridge using Speed and Length of Train | Function to calculate the length of bridge . ; Assuming the input variables
function bridge_length ( trainLength , Speed , Time ) { return ( ( Time * Speed ) - trainLength ) ; } var trainLength = 120 ; var Speed = 30 ; var Time = 18 ; document . write ( " " + bridge_length ( trainLength , Speed , Time ) + " " ) ;