Loop to iterate over the two elements of the array
for ( var i = 0 ; i < n ; ++ i ) { var X = joinNumbers ( A [ i ] , B [ i ] ) ; var Y = joinNumbers ( B [ i ] , A [ i ] ) ; var mx = Math . max ( X , Y ) ; maxArr [ i ] = mx ; }