Find the count of numbers that can be formed using digits 3 , 4 only and having length at max N . | Function to find the count of numbers that can be formed using digits 3 , 4 only and having length at max N . ; Driver code
function numbers ( n ) { return ( Math . pow ( 2 , n + 1 ) ) - 2 ; } var n = 2 ; document . write ( numbers ( n ) ) ;