javascript program to demonstrate descending order
function reverse ( a ) { var i , k , n = a . length ; var t ; for ( i = 0 ; i < n / 2 ; i ++ ) { t = a [ i ] ; a [ i ] = a [ n - i - 1 ] ; a [ n - i - 1 ] = t ; } }