{"action":"created","issue":{"url":"https://api.github.com/repos/asciidwango/js-primer/issues/68","repository_url":"https://api.github.com/repos/asciidwango/js-primer","labels_url":"https://api.github.com/repos/asciidwango/js-primer/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/asciidwango/js-primer/issues/68/comments","events_url":"https://api.github.com/repos/asciidwango/js-primer/issues/68/events","html_url":"https://github.com/asciidwango/js-primer/issues/68","id":163304188,"number":68,"title":"Iteration: for/for in/for of/while/do while","user":{"login":"azu","id":19714,"avatar_url":"https://avatars.githubusercontent.com/u/19714?v=3","gravatar_id":"","url":"https://api.github.com/users/azu","html_url":"https://github.com/azu","followers_url":"https://api.github.com/users/azu/followers","following_url":"https://api.github.com/users/azu/following{/other_user}","gists_url":"https://api.github.com/users/azu/gists{/gist_id}","starred_url":"https://api.github.com/users/azu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azu/subscriptions","organizations_url":"https://api.github.com/users/azu/orgs","repos_url":"https://api.github.com/users/azu/repos","events_url":"https://api.github.com/users/azu/events{/privacy}","received_events_url":"https://api.github.com/users/azu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/asciidwango/js-primer/labels/%E5%9F%BA%E7%A4%8E%E6%96%87%E6%B3%95","name":"基礎文法","color":"1d76db"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-01T02:00:02Z","updated_at":"2016-07-03T12:02:28Z","closed_at":null,"body":"#31 制御構文からの分離\r\n\r\n#31 制御構文 -> iteration(ココ) の順番\r\n\r\n- [ ] for\r\n- [ ] while\r\n- [ ] do while いる?\r\n- [ ] labelとbreakとcontinue\r\n- [ ] for in\r\n- [ ] for of\r\n\r\nそれぞれがどういう時に使うものをはっきりしたユースケースを用意して説明した方がよさそう。\r\n具体的に何か結果を出すコードを使ったほうがよさそう。値の合計を出すとか\r\n\r\n- for\r\n\t- なんでもありそう\r\n- while\r\n\t- 正規表現?\r\n- do while\r\n\t- [ ] 何があるかな?\r\n- labelとbreakとcontinue\r\n\t- breakとcontinueは使うけど、labelは殆ど使わない(一気に抜ける時ぐらいか)\r\n- for in\r\n\t- Legacy\r\n\t- Array methodsを代わりに使う\r\n- for of\r\n\t- iteratorなのでここでは説明が難しそう\r\n\t- もっと概念的な説明になる?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/asciidwango/js-primer/issues/comments/230149964","html_url":"https://github.com/asciidwango/js-primer/issues/68#issuecomment-230149964","issue_url":"https://api.github.com/repos/asciidwango/js-primer/issues/68","id":230149964,"user":{"login":"azu","id":19714,"avatar_url":"https://avatars.githubusercontent.com/u/19714?v=3","gravatar_id":"","url":"https://api.github.com/users/azu","html_url":"https://github.com/azu","followers_url":"https://api.github.com/users/azu/followers","following_url":"https://api.github.com/users/azu/following{/other_user}","gists_url":"https://api.github.com/users/azu/gists{/gist_id}","starred_url":"https://api.github.com/users/azu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azu/subscriptions","organizations_url":"https://api.github.com/users/azu/orgs","repos_url":"https://api.github.com/users/azu/repos","events_url":"https://api.github.com/users/azu/events{/privacy}","received_events_url":"https://api.github.com/users/azu/received_events","type":"User","site_admin":false},"created_at":"2016-07-03T12:02:28Z","updated_at":"2016-07-03T12:02:28Z","body":"- [do-while文 - Wikipedia](https://ja.wikipedia.org/wiki/Do-while%E6%96%87)\r\n- [Why I favor while loops | Blog | Miller Medeiros](http://blog.millermedeiros.com/why-i-favor-while-loops/)\r\n- [For, While, and Do...While Loops in JavaScript | kirupa.com](https://www.kirupa.com/html5/loops_in_javascript.htm)\r\n- [ループと反復処理 - JavaScript | MDN](https://developer.mozilla.org/ja/docs/Web/JavaScript/Guide/Loops_and_iteration)\r\n\r\n## ユースケース\r\n\r\n- for\r\n\t- 数の合計\r\n\t- 配列の列挙\r\n- while\r\n\t- カウントダウン\r\n\t- 副作用 - 正規表現のexec?/配列のpop()?\r\n- do-while\r\n\t- コンソール出力\r\n- breakとcontinue\r\n\t- break; 多次元配列からの探索\r\n\t- continue; ループにおける早期return\r\n- while - 無限ループ\r\n- for...in\r\n\t- オブジェクトの列挙\r\n\t- だが基本的に代用手段があるのでそちらを使う\r\n\t- Badパーツについては深く踏み込むかどうか?\r\n\t- [Rule guard-for-in - ESLint - Pluggable JavaScript linter](http://eslint.org/docs/rules/guard-for-in \"Rule guard-for-in - ESLint - Pluggable JavaScript linter\")\r\n- for...of\r\n\t- iterateの概念解説"}}
{"actor":{"display_login":"azu"}}