/documentation/js/object_comprehensions.js

http://github.com/jashkenas/coffee-script · JavaScript · 18 lines · 15 code · 2 blank · 1 comment · 1 complexity · 399cd9852632eb6309840c0b9e5d3fbd MD5 · raw file

  1. // Generated by CoffeeScript 1.10.0
  2. var age, ages, child, yearsOld;
  3. yearsOld = {
  4. max: 10,
  5. ida: 9,
  6. tim: 11
  7. };
  8. ages = (function() {
  9. var results;
  10. results = [];
  11. for (child in yearsOld) {
  12. age = yearsOld[child];
  13. results.push(child + " is " + age);
  14. }
  15. return results;
  16. })();