Scripting: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 11: Line 11:
Like the Memento Calculation field type that game before it, the JavaScript field exists to produce ("return") a value calculated with an ''expression'', which is a formula consisting of ''constants'', ''variables'', ''operators'', and possibly ''statements''.
Like the Memento Calculation field type that game before it, the JavaScript field exists to produce ("return") a value calculated with an ''expression'', which is a formula consisting of ''constants'', ''variables'', ''operators'', and possibly ''statements''.


==== Example scripts ====
==== Example simple expression scripts ====
:;123: the value ''a hundred and twenty-three''
:;123: the value ''a hundred and twenty-three''
:;"Memento": the characters ''M e m e n t o'' as a string
:;"Memento": the characters ''M e m e n t o'' as a string