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

19 lines
381 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;
for (child in _b) {
if (!__hasProp.call(_b, child)) continue;
2010-02-21 16:45:03 +00:00
age = _b[child];
_a.push(child + " is " + age);
}
2010-02-21 16:45:03 +00:00
return _a;
2010-04-11 21:57:29 +00:00
})();
2010-02-24 23:27:10 +00:00
})();