jashkenas--coffeescript/documentation/js/object_comprehensions.js

18 lines
367 B
JavaScript
Raw Normal View History

(function(){
var _a, _b, age, ages, child, yearsOld;
2010-01-14 04:24:45 +00:00
var __hasProp = Object.prototype.hasOwnProperty;
yearsOld = {
max: 10,
ida: 9,
tim: 11
};
ages = (function() {
_a = []; _b = yearsOld;
2010-02-21 16:45:03 +00:00
for (child in _b) { if (__hasProp.call(_b, child)) {
age = _b[child];
_a.push(child + " is " + age);
}}
return _a;
2010-04-11 21:57:29 +00:00
})();
2010-02-24 23:27:10 +00:00
})();