Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save creativedrewy/5122356 to your computer and use it in GitHub Desktop.
Save creativedrewy/5122356 to your computer and use it in GitHub Desktop.
Using the "do" keyword in coffeescript
switch message
when "hi" then returnData = "bye"
when "goodbye" then do ->
part1 = "This is just "
part2 = "a sample of how to do this"
returnData = part1 + part2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment