-
Notifications
You must be signed in to change notification settings - Fork 6
Optional Commas
Shane Brinkman-Davis Delamore edited this page Apr 5, 2017
·
1 revision
Value-Lists are used in:
In all these cases, commas are optional:
- following Atomic Literals - example:
1 2
- following explicit Array Literals - example:
[1] [2]
- following explicit Object Literals - example:
{a:1} {b:2}
a = 1 2 3
b = red: #f00 green: #0f0 blue: #00f
c = functionTaking4Strings :the :quick :brown :fox
foo
a, # optional comma function-invocation block
b
# foo(a, b)
c =
a, # optional comma in implicit array-literal
b
# c = [a, b]
- Home
- Get Started
- Benefits
- Highlights
- Productivity by Design
- CaffeineScript Design
- What is CaffeineScript Good For?
- Get the most out of JavaScript
- Language Comparison
- CHANGELOG
- Blocks Instead of Brackets
- Binary Line-Starts
- Everything Returns a Value
- Streamlined Modules
- Scopes and Variables
- Optional Commas
- Semantics
- Ambiguities