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

19 lines
402 B
JavaScript
Raw Normal View History

(function(){
var __a, __b, age, ages, child, years_old;
2010-01-14 04:24:45 +00:00
var __hasProp = Object.prototype.hasOwnProperty;
years_old = {
max: 10,
ida: 9,
tim: 11
};
ages = (function() {
__a = []; __b = years_old;
for (child in __b) {
age = __b[child];
2010-01-14 04:24:45 +00:00
if (__hasProp.call(__b, child)) {
__a.push(child + " is " + age);
}
}
return __a;
2010-01-25 05:14:00 +00:00
}).call(this);
})();