Recursive function to generate all binary strings formed by replacing each wildcard character by 0 or 1
function print ( str , index ) { if ( index === str . length ) { document . write ( str . join ( " " ) + " " ) ; return ; } if ( str [ index ] === " " ) {