Created
November 30, 2012 17:07
-
-
Save jrunning/4177040 to your computer and use it in GitHub Desktop.
CoffeeScript object literal gotcha
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # try it live: http://bit.ly/TwZV18 | |
| # CoffeeScript # JavaScript | |
| foo # foo({ | |
| bar: 1 # bar: 1, | |
| baz: 2 # baz: 2, | |
| qux: 3 # qux: 3 | |
| # }); | |
| foo # foo({ | |
| bar: 1, # bar: 1, | |
| baz: 2, # baz: 2, | |
| qux: 3 # qux: 3 | |
| # }); | |
| foo bar: 1, # foo({ | |
| baz: 2, # bar: 1 | |
| qux: 3 # }, { # ... Welp. | |
| # baz: 2, | |
| # qux: 3 | |
| #}); | |
| foo bar: 1 # | |
| baz: 2 # # Parse error | |
| qux: 3 # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment