Checking if frequency of character is even or odd .
if ( ( getFrequency ( tree , r , i ) - getFrequency ( tree , l - 1 , i ) ) % 2 == 1 ) count ++ ; } } if ( count <= 1 ) document . write ( " " ) ; else document . write ( " " ) ; }