β is this syntax correct
IsUp is a method that gets an array and returns whether it's ordered is a rising way. But it doesn't matter, is this syntax correct? I'm trying to return true if both s and tmp r rising. I'd usually write it as 2 different sections and connecting them w && but I tried this way js bc it's used in math and it doesn't give me any errors but idk if it'll function the way I want it to
4 Replies
Aaron
REPL Result: Success
Result: bool
Compile: 387.899ms | Execution: 54.787ms | React with β to remove this embed.
so no, that doesn't do what you want
it's doing
(IsUp(s) == IsUp(tmp)) == true
if both IsUp's return false, they're equal, which makes the entire thing truethe correct thing would be
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.