default.txt 615 B

12345678910111213141516171819202122232425262728293031323334353637
  1. print "I am #{math.random! * 100}% sure."
  2. my_function = (name="something", height=100) ->
  3. print "Hello I am", name
  4. print "My height is", height
  5. my_function dance: "Tango", partner: "none"
  6. my_func 5,4,3, -- multi-line arguments
  7. 8,9,10
  8. table = {
  9. name: "Bill",
  10. age: 200,
  11. ["favorite food"]: "rice",
  12. :keyvalue,
  13. [1+7]: 'eight'
  14. }
  15. class Inventory
  16. new: =>
  17. @items = {}
  18. add_item: (name) =>
  19. if @items[name]
  20. @items[name] += 1
  21. else
  22. @items[name] = 1
  23. inv = Inventory!
  24. inv\add_item "t-shirt"
  25. inv\add_item "pants"
  26. import
  27. assert_csrf
  28. require_login
  29. from require "helpers"