Functions

When writing code in your stories, functions are special devices that can be used in expressions in place of variables or values.

Syntactically, they consist of:

Technically speaking, any Javascript built-in function is available to the Twine author: parseInt(), JSON.stringify(), document.createElement() and all the rest are accessible, as are any functions that have been added by scripts.