do the same for second string
else if ( ! ( ( str2 [ i ] . charCodeAt ( ) >= ' ' . charCodeAt ( ) && str2 [ i ] . charCodeAt ( ) <= ' ' . charCodeAt ( ) ) || ( str2 [ i ] . charCodeAt ( ) >= ' ' . charCodeAt ( ) && str2 [ i ] . charCodeAt ( ) <= ' ' . charCodeAt ( ) ) ) ) { return false ; }