Hello, a noob here, I'm trying to create a function that outputs a true or false depending on the situation.
When the number is positive the output has to be false and when the number is negative the output has to be true.
I get "Function tried to send a message of type number" as output.
Now it outputs the same number as the input.
msg.payload = true
, NOT msg.payload === true
Same for false
jbudd
12 April 2022 11:53
7
One = is an assignment msg.payload = "hello"
(Make payload equal hello)
Two or three = is a comparison : msg.payload === "hello"
(Does payload equal hello?)
1 Like
Thanks for helping a beginner steve, that worked.
1 Like
system
Closed
26 April 2022 11:54
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.