Category:Logic

Allows you to check if two different conditions are true or false at the same time.

Commonly used to construct complex if statements.

And: Returns true if both conditions are true.

Or: Returns true if at least one condition is true.

Parameters

NameDescription
condition 1 A sequence of blocks, including logic blocks, that the computer can evaluate as either true or false
operation and/or
condition 2 A sequence of blocks, including logic blocks, that the computer can evaluate as either true or false

Tips

  • Use “and” if multiple conditions have to be true for the code to run. Use “or” if only one of several conditions has to be true for the code to run.

Found a bug in the documentation? Let us know at documentation@code.org