for (var i = 0; i < comments.length; i++) {
comments[i].avatar = (yield commentModel.getAvatar({name: comments[i].name})).author.avatar;
comments[i].createtime = formatDate(comments[i].createtime, true);
comments[i].comment = marked(comments[i].comment);
comments[i].cid = String(comments[i]._id);
}
不会错误
_.forEach(comments,function(comment, key){
console.log((yield commentModel.getAvatar({name: comment.name})))
});
//SyntaxError: Unexpected identifier
//lodashjs
需要怎么处理,包裹?