Count all possible strings that can be generated by placing spaces | Function to count the number of strings that can be generated by placing spaces between pair of adjacent characters ; Count of positions for spaces ; Count of possible strings ; Driver Code
function countNumberOfStrings ( s ) { let n = s . length - 1 ; let count = ( Math . pow ( 2 , n ) ) ; return count ; } let S = " " ; document . write ( countNumberOfStrings ( S ) ) ;