If character not found in string then increment count
if ( pos < 0 pos > s . length ) counter += 1 ; } if ( counter == 0 ) document . write ( " " ) ; else if ( counter >= 2 ) document . write ( " " + " " ) ; else document . write ( " " ) ; }