Skip to content

"Conditional Statements": Chapbook (v1.0.0)#

Summary#

The [if condition] and [else] modifiers found in the Conditional Display section of the Chapbook guide can be used to conditionally display content based on the current value of a variable.

Example#

Download

Twee Code#

:: StoryTitle
Conditional Statements in Chapbook

:: Start
animal: "horse"
--
[if animal === "dog"]
It's a dog!
[else]
It's a horse!
[continue]

Twee Download

See Also#

Setting and Showing Variables