Skip to content

Instantly share code, notes, and snippets.

@vman
Created January 25, 2012 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vman/1676432 to your computer and use it in GitHub Desktop.
Save vman/1676432 to your computer and use it in GitHub Desktop.
generalcoffee
#The initCoffee function has one required paramter (firstname) and one optional paramter (lastname) whose default valu has been provided.
initCoffee = (firstname, lastname="deshpande") ->
#You can include wildcards whithin a string so you dont have to concatenate various strings together.
alert "Hi #{firstname} #{lastname}! Welcome to CoffeeScript Demo on SharePoint"
#Call the initCoffee function with passing only one parametre.
initCoffee("vardhaman")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment