/documentation/coffee/while.coffee

http://github.com/jashkenas/coffee-script · CoffeeScript · 10 lines · 7 code · 1 blank · 2 comment · 3 complexity · 82eb300e9866995098a8124682b94a52 MD5 · raw file

  1. # Econ 101
  2. if this.studyingEconomics
  3. buy() while supply > demand
  4. sell() until supply > demand
  5. # Nursery Rhyme
  6. num = 6
  7. lyrics = while num -= 1
  8. "#{num} little monkeys, jumping on the bed.
  9. One fell out and bumped his head."