Skip to main content

3. Control flow and functions

Control execution order and reuse logic with functions, imports and fragments. -> defines a script function, import loads a resource, and @@ calls a registered language executor.

var shipping = (amount) -> {
if (amount >= 100) {
return 0;
}
return 10;
};
return shipping(80);

The result is 10. Use result transformation or collection functions to process list items.