Function to print1 the arrays
function print1 ( a , b ) { let minProd = 0 ; for ( let i = 0 ; i < a . length ; ++ i ) { document . write ( a [ i ] + " " ) ; } document . write ( " " ) ; for ( let i = 0 ; i < b . length ; ++ i ) { document . write ( b [ i ] + " " ) ; minProd += a [ i ] * b [ i ] ; } document . write ( " " ) ; document . write ( minProd ) ; }