Always difficult to provide support based on a picture of half the problem
https://nodered.org/docs/user-guide/writing-functions#multiple-outputs
By setting multiple outputs for a function node, returning an array of messages sends each message in order to a different output. By making messages null, nothing is sent. In effect this allows for switching / route selection in the function node itself.
With an array of array, multiple messages are sent in sequence from the output. An array of arrays sends multiple messages from multiple outputs. Great fun.
We have to assume that the OP’s code contains an else clause with
return [null, msg] or similar and that the function node is set with 2 outputs.
On the OP, the code should work as-is since comparison operators have a higher precedence than logical AND.
https://www.w3schools.com/js/js_precedence.asp
( ) can always help visually, as can naming. I assumed that the object here is to test for
isroom = room humidity > target + tolerance
isoutside = outside humidity < target
Which coded as two separate tests makes the final decision
isroom && isoutside
If the case is indeed that either test works as intended, the logical conclusion is that with AND requiring BOTH to be true, this is just not the case at the moment in time. A common cause of logic failure is to require a number that is both less than 3 AND greater than 5.
Well, it doesn’t fail as such, just always returns false.
Combined, both tests are I think
out < target < target + tolerance < room
and rearranged
out < target < room - tolerance
which should be fine. I am going with it all works but that the test is genuinely false.
Also as the OP asked for suggestions… Don’t use VAR to declare variables, use LET instead. VAR all end up as global variables on the stack and are not recovered until Node-RED restarts, leading to memory leakage. LET and CONST are declared in the function space and recoverable.