Program to print numbers from N to 1 in reverse order | Recursive function to print from N to 1 ; if N is less than 1 then return void function ; recursive call of the function ; Driver code
function PrintReverseOrder ( N ) { if ( N <= 0 ) { return ; } else { document . write ( N + " " ) ; PrintReverseOrder ( N - 1 ) ; } } let N = 5 ; PrintReverseOrder ( N ) ;