Skip to content

"Deleting Variables": Chapbook (v1.0.0)#

Summary#

While variables created using the [JavaScript] modifier can be deleted within their blocks, any created within the Vars Section can simply be set to undefined to make them unable to be shown within an expression using the engine.state.set() function.

Example#

Download

Twee Code#

:: StoryTitle
Chapbook: Deleting Variables

:: Start
color: "red"
--
[JavaScript]
engine.state.set("color", undefined)
[continued]
What is color? {color}

Twee Download