> For the complete documentation index, see [llms.txt](https://docs.thunkable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thunkable.com/snap-to-place/logic.md).

# Logic

## Comparison Blocks

[If `then`, do `that`](/snap-to-place/control.md#if-this-do-that) blocks are often paired with statement blocks that test whether a condition is met

The comparison blocks will compare two values and return **true** or **false** based on whether the condition is met.

![](/files/-MXldIORWN6DHNiS6c3s)

{% embed url="<https://youtu.be/2Y79qasUIOM>" %}

## And/Or blocks

![](/files/-MXldcAyjLWUjurL-Yrb)

You can compare multiple conditions at once.

The **and** block will return **true** if both statements are true, **false** otherwise.

The **or** block will return **true** if either statement is true, and **false** if neither statement is true.

## Not

![](/files/-MXle-ftfyt4vhVYKxaB)

Inverts the value of a true/false statement. Not true = false, not false = true.

## Value Blocks

Value blocks can be used to set the value of a variable. They can be used in conjunction with any of the above blocks.

![](/files/-MXleACb6tPZnXYA66ry)
