Document *what* about the behaviour shown? I'm sure you don't mean to say that we should document the fact the *literally* `1 or 0 and 3` returns 1, but I don't know what you think we should document beyond what is already stated in the existing docs. It might be obvious to you, but it isn't obvious to me.
Thank you Serhiy, we did document here: > The expression x and y first evaluates x; if x is false, its value is returned; otherwise, y is evaluated and the resulting value is returned. > The expression x or y first evaluates x; if x is true, its value is returned; otherwise, y is evaluated and the resulting value is returned. Sorry, Steven. I should make it clear. I think the output of the example(1, 3) depends on the input order of number(1 or 0, 0 or 1) is not an expected behavior to me. Maybe we can add an example/note in the document. "Sometimes this will cause unexpected behavior when you put `or` and `and` together..."
Windson, it still is not clear what exactly you find unexpected in view of supplied links: 1 or 0 and 3 or has higher precedence than and, therefore it's evaluated first. It's first argument (1) is truthy, therefore it's returned. End of comparison. 0 or 1 and 3 starts the same, but now the second argument (1 and 3) needs evaluating and its return value (3) will be the end result. End of comparison. I certainly think the suggested wording is a no go.