init.number creates a new integer with a pre-defined value. By default, numeric values are bridged, so you can use ints and doubles interchangeably. However, some transformers require a pure integer value, and using double will result in an error.

{[ var myNumber @init.number(1) /]}


init.string creates a new string with pre-defined value:

{[ var myNewString @init.string("My String") /]}

Note that the compiler is smart enough to know what you are asking for and in most cases, you can just omit the method altogether. The following syntax produces the same result:

{[ var myNewString "My String" /]}


init.array creates a new, empty array that can be mutated using transformers:

{[ var myNewArray @new.array() /]}


init.dictionary creates a new, empty object that can be mutated using transformers:

{[ var myNewDict @new.dict() /]}