text: Driver Code
code: var a = [ 37 , 23 , 0 , 17 , 12 , 72 , 31 , 46 , 100 , 88 , 54 ] ; var n = a . length , i ; insertionSort ( a , n ) ; document . write ( " " + " " ) ; for ( i = 0 ; i < n ; i ++ ) document . write ( a [ i ] + " " ) ;