Driver code
let arr = [ 999 , 612 , 589 , 856 , 56 , 945 , 243 ] ; let n = arr . length ; mergeSort ( arr , n ) ; document . write ( " " ) ; for ( let i = 0 ; i < n ; i ++ ) { document . write ( arr [ i ] + " " ) ; }