File: functions.md

package info (click to toggle)
coffeescript 1.12.8~dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,748 kB
  • sloc: javascript: 815; makefile: 57; xml: 9; sh: 6
file content (13 lines) | stat: -rw-r--r-- 384 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
## 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)')
```

Functions may also have default values for arguments, which will be used if the incoming argument is missing (`null` or `undefined`).

```
codeFor('default_args', 'fill("cup")')
```