Guest User

Untitled

a guest
Jan 21st, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. a = b = c = 0
  2.  
  3. # This works.
  4. # Note how the 2nd line is indented so "b" in 2nd line
  5. # is in the same column as "a" in 1st line.
  6. if a is b and
  7. b is c
  8. console.log 'works'
  9.  
  10. # This also works, but is ugly.
  11. if a is b and
  12. b is c
  13. console.log 'works'
  14.  
  15. # This doesn't work because the "if" line needs some indication that
  16. # the expression continues on the next line ... like ending with "and".
  17. # Adding parens around the expression apparently isn't enough.
  18. ###
  19. if (a is b
  20. and b is c)
  21. console.log 'works'
  22. ###
  23.  
  24. function1 = (p1, p2, p3, p4) -> console.log 'in function1'
  25.  
  26. function2 = (p1, p2, p3) -> console.log 'in function2'
  27.  
  28. # This works if the 2nd and 3rd lines have the same indentation.
  29. # No other indentation of the 3rd line seems to work.
  30. function1 this,
  31. function2("doesn't",
  32. "work"),
  33. "sorry"
Add Comment
Please, Sign In to add comment