2016-12-08 03:19:55 -05:00
|
|
|
## Functions
|
|
|
|
|
|
|
|
Functions are defined by an optional list of parameters in parentheses, an arrow, and the function body. The empty function looks like this: `->`
|
|
|
|
|
|
|
|
```
|
|
|
|
codeFor('functions', 'cube(5)')
|
|
|
|
```
|
|
|
|
|
2016-12-18 21:13:59 -05:00
|
|
|
Functions may also have default values for arguments, which will be used if the incoming argument is missing (`undefined`).
|
2016-12-08 03:19:55 -05:00
|
|
|
|
|
|
|
```
|
|
|
|
codeFor('default_args', 'fill("cup")')
|
|
|
|
```
|