{"action":"opened","issue":{"url":"https://api.github.com/repos/qinxiaocha/jsTips/issues/3","repository_url":"https://api.github.com/repos/qinxiaocha/jsTips","labels_url":"https://api.github.com/repos/qinxiaocha/jsTips/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/qinxiaocha/jsTips/issues/3/comments","events_url":"https://api.github.com/repos/qinxiaocha/jsTips/issues/3/events","html_url":"https://github.com/qinxiaocha/jsTips/issues/3","id":219447618,"number":3,"title":"for in sync in array different from in object","user":{"login":"qinxiaocha","id":19800843,"avatar_url":"https://avatars0.githubusercontent.com/u/19800843?v=3","gravatar_id":"","url":"https://api.github.com/users/qinxiaocha","html_url":"https://github.com/qinxiaocha","followers_url":"https://api.github.com/users/qinxiaocha/followers","following_url":"https://api.github.com/users/qinxiaocha/following{/other_user}","gists_url":"https://api.github.com/users/qinxiaocha/gists{/gist_id}","starred_url":"https://api.github.com/users/qinxiaocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinxiaocha/subscriptions","organizations_url":"https://api.github.com/users/qinxiaocha/orgs","repos_url":"https://api.github.com/users/qinxiaocha/repos","events_url":"https://api.github.com/users/qinxiaocha/events{/privacy}","received_events_url":"https://api.github.com/users/qinxiaocha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-05T02:32:16Z","updated_at":"2017-04-05T02:32:16Z","closed_at":null,"body":"```\r\n// 数组中每个单词，首字母大写\r\n\r\n\r\n// 一般写法\r\nconst arr = ['apple', 'pen', 'apple-pen'];\r\nfor(const i in arr){\r\n  const c = arr[i][0];\r\n  arr[i] = c.toUpperCase() + arr[i].slice(1);\r\n}\r\n\r\nconsole.log(arr);\r\n\r\n\r\n自己写例子输出for in 在数组和对象的中i分别代表什么\r\n```"}}
{"actor":{"display_login":"qinxiaocha"}}