Driver code
var arr = [ 64 , 34 , 25 , 12 , 22 , 11 , 90 ] bubbleSort ( arr , arr . length ) ; document . write ( " " + " " ) ; for ( var i = 0 ; i < arr . length ; i ++ ) { document . write ( arr [ i ] + " " ) ; }