翻译
yi2369 opened this issue · comments
yifeng commented
Challenge Everything Be True has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function every(collection, pre) {
// Is everyone being true?
for (var i=0;i<collection.length;i++){
if (!collection[i][pre]){
return false;
}
}
return true;
}
every([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
判断谓词(第二个参数)是否对一个集合(第一个参数)的所有元素都成立。
在汉语的环境里这句话不好理解,建议改成:判断谓词(第二个参数)在集合(第一个参数)的所有元素里都有效。
胡落阳 commented
感谢你的反馈。
此题的翻译是英文的直译,确实很生硬。
我已重新翻译此题。
欢迎review。
South Drifted commented
@huluoyang 建议用 Commit Message 指令来关闭对应 Issue,既方便提出人 review,又利于日后 追溯历史~
胡落阳 commented
@TechQuery 不懂如何使用 Commit Message 指令来关闭对应 Issue,求指教。
是因为我没有@具体人,直接回复的原因吗?
South Drifted commented
胡落阳 commented
@TechQuery 感谢分享。