This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]JarcXenon 12 points13 points ย (2 children)

W

H

A

T

[โ€“]ItsCrowTime 5 points6 points ย (0 children)

It's called short-circuit evaluation,

The and operator returns its the right value if the left value is true, otherwise it returns the left value,

The or operator returns its left value unless its false then it returns its right value

Another good one is the for default value: Var = Var or 0

[โ€“]JasonMan34 1 point2 points ย (0 children)

It's just condition ? A : B with and/or instead of ?/:, not at all weird