JavaScript

All values and functions are written in embedded JavaScript in SpaceTode. For example, all the symbol functions are written in JavaScript:

given W (element) => element === Water

The JavaScript above is (element) => element === Water. You can extend your JavaScript over multiple lines by ending a line with a bracket:

given W (element) => {
    return element === Water
}

You can also place your JavaScript within brace brackets if you want to make a closure:

given W { return (element) => element === Water }

Last updated