Skip to content

Codetree Examples: If

Stephen Leach edited this page Aug 14, 2020 · 6 revisions

Example 1

Nutmeg:

if x then "yes" else "no" endif

JSON:

{
    "kind": "if",
    "test": {
        "kind": "id",
        "name": "x"
    },
    "then":{
        "kind": "string",
        "value": "yes",
        "reftype": "get"
    },
    "else": {
        "kind": "string",
        "value": "no"
    }
}
Clone this wiki locally