Created
March 9, 2013 03:29
-
-
Save creativedrewy/5122356 to your computer and use it in GitHub Desktop.
Using the "do" keyword in coffeescript
This file contains 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
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