我在coffescript这个代码最好的方法来遍历数组,并调用函数中的CoffeeScript
copy pages.template for pages in configFiles.pages
,在Java脚本生成的代码
var pages, _i, _len, _ref;
_ref = configFiles.pages(function() {});
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
pages = _ref[_i];
copy(pages.template);
}
但我想是调用2更多功能如下:
var pages, _i, _len, _ref;
_ref = configFiles.pages(function() {});
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
pages = _ref[_i];
copy(pages.template);
copy2(pages.template);
copy3(pages.template);
}
我不知道这是否是一种好的做法。我是编程界的新手。 如果是我该如何做到这一点咖啡脚本?如果不是什么是最好的解决方案?
谢谢
我在找什么。谢谢 – user1328334 2012-04-12 22:14:30