Skip to content

Globals

Rohan Singh edited this page Aug 23, 2014 · 1 revision

The global object stores values that are visible to all scripts running in the same state. Use of globals should be limited to avoid conflicts.

// script1.mnd
global.add = fun (x, y) -> x + y;
// script2.mnd
return global.add(10, 5);