ELI5: Explain Like I'm 5

Short-circuit evaluation

Short-circuit evaluation is kind of like a cheat code you can use when you're doing a math problem. When you're using short-circuit evaluation, you can skip parts of your math problem if you know that the answer won't change.

For example, if you were trying to figure out if 2 + 3 = 5 and 3 + 2 = 5, you don't have to do both math problems. You already know that the answer is 5, so you can just take the first equation and use that to get the answer. That's what short-circuit evaluation is: a way to save time by skipping over parts of a math problem that won't change the answer.
Related topics others have asked about: