Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = b = c = 0
- # This works.
- # Note how the 2nd line is indented so "b" in 2nd line
- # is in the same column as "a" in 1st line.
- if a is b and
- b is c
- console.log 'works'
- # This also works, but is ugly.
- if a is b and
- b is c
- console.log 'works'
- # This doesn't work because the "if" line needs some indication that
- # the expression continues on the next line ... like ending with "and".
- # Adding parens around the expression apparently isn't enough.
- ###
- if (a is b
- and b is c)
- console.log 'works'
- ###
- function1 = (p1, p2, p3, p4) -> console.log 'in function1'
- function2 = (p1, p2, p3) -> console.log 'in function2'
- # This works if the 2nd and 3rd lines have the same indentation.
- # No other indentation of the 3rd line seems to work.
- function1 this,
- function2("doesn't",
- "work"),
- "sorry"
Add Comment
Please, Sign In to add comment