Multiplication with a power of 2 | Returns 2 raised to power n ; Driver Code
function power2 ( n ) { if ( n == 0 ) return 1 ; if ( n == 1 ) return 2 ; return power2 ( n / 2 ) * power2 ( n / 2 ) ; } function multiply ( x , n ) { return x * power2 ( n ) ; } let x = 70 let n = 2 ; document . write ( multiply ( x , n ) ) ;