Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

翻译 #230

Closed
yi2369 opened this issue Sep 26, 2016 · 5 comments
Closed

翻译 #230

yi2369 opened this issue Sep 26, 2016 · 5 comments

Comments

@yi2369
Copy link

yi2369 commented Sep 26, 2016

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");

判断谓词(第二个参数)是否对一个集合(第一个参数)的所有元素都成立。
在汉语的环境里这句话不好理解,建议改成:判断谓词(第二个参数)在集合(第一个参数)的所有元素里都有效。

@huluoyang
Copy link
Owner

感谢你的反馈。
此题的翻译是英文的直译,确实很生硬。
我已重新翻译此题。
欢迎review。

@TechQuery
Copy link

TechQuery commented Sep 26, 2016

@huluoyang 建议用 Commit Message 指令来关闭对应 Issue,既方便提出人 review,又利于日后 追溯历史~

@huluoyang
Copy link
Owner

@TechQuery 不懂如何使用 Commit Message 指令来关闭对应 Issue,求指教。
是因为我没有@具体人,直接回复的原因吗?

@TechQuery
Copy link

@huluoyang
Copy link
Owner

@TechQuery 感谢分享。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants