{"action":"created","issue":{"url":"https://api.github.com/repos/cobish/demo/issues/1","repository_url":"https://api.github.com/repos/cobish/demo","labels_url":"https://api.github.com/repos/cobish/demo/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cobish/demo/issues/1/comments","events_url":"https://api.github.com/repos/cobish/demo/issues/1/events","html_url":"https://github.com/cobish/demo/issues/1","id":155212974,"number":1,"title":"2016 年 05 月，学习总结","user":{"login":"cobish","id":8475099,"avatar_url":"https://avatars.githubusercontent.com/u/8475099?v=3","gravatar_id":"","url":"https://api.github.com/users/cobish","html_url":"https://github.com/cobish","followers_url":"https://api.github.com/users/cobish/followers","following_url":"https://api.github.com/users/cobish/following{/other_user}","gists_url":"https://api.github.com/users/cobish/gists{/gist_id}","starred_url":"https://api.github.com/users/cobish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobish/subscriptions","organizations_url":"https://api.github.com/users/cobish/orgs","repos_url":"https://api.github.com/users/cobish/repos","events_url":"https://api.github.com/users/cobish/events{/privacy}","received_events_url":"https://api.github.com/users/cobish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-17T09:21:03Z","updated_at":"2016-05-24T11:36:12Z","closed_at":null,"body":"## 05 月 17 日\r\n\r\n### ES6\r\n\r\n- 暂时为了练习使用了 Google 的 ``Traceur 转码器``；\r\n- ``let`` 和 ``const``，``let`` 弥补了 ``var`` 没有块级作用域的缺陷，``const`` 则可以定义只读的常量。\r\n\r\n### Shell 命令\r\n- ``rm`` 命令，删除目录需添加 ``-r`` 参数。\r\n\r\n![728e5ca9-9e80-46c3-9f41-1a6b2c828a13](https://cloud.githubusercontent.com/assets/8475099/15320927/d068c164-1c65-11e6-9de5-aec5d06e58c9.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cobish/demo/issues/comments/221242558","html_url":"https://github.com/cobish/demo/issues/1#issuecomment-221242558","issue_url":"https://api.github.com/repos/cobish/demo/issues/1","id":221242558,"user":{"login":"cobish","id":8475099,"avatar_url":"https://avatars.githubusercontent.com/u/8475099?v=3","gravatar_id":"","url":"https://api.github.com/users/cobish","html_url":"https://github.com/cobish","followers_url":"https://api.github.com/users/cobish/followers","following_url":"https://api.github.com/users/cobish/following{/other_user}","gists_url":"https://api.github.com/users/cobish/gists{/gist_id}","starred_url":"https://api.github.com/users/cobish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobish/subscriptions","organizations_url":"https://api.github.com/users/cobish/orgs","repos_url":"https://api.github.com/users/cobish/repos","events_url":"https://api.github.com/users/cobish/events{/privacy}","received_events_url":"https://api.github.com/users/cobish/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T11:36:12Z","updated_at":"2016-05-24T11:36:12Z","body":"## 05 月 24 日\r\n\r\n### ES6\r\n\r\n> **函数的扩展：**[《ECMAScript 6 入门》](http://es6.ruanyifeng.com/#docs/function)。\r\n\r\n- ``rest 参数``。使用三个点加变量的形式，用于获取函数多余的参数，这样就不需要使用 arguments 对象了；\r\n\r\n``` javascript\r\nfunction add(...values) {\r\n    let sum = 0;\r\n\r\n    for (let val of values) {\r\n        sum += val;\r\n    }\r\n\r\n    return sum;\r\n}\r\n\r\nconsole.log(add(2, 5, 3));  // 10\r\n```\r\n\r\n- ``扩展运算符``也是三个点，它好比是 ``rest参数`` 的逆运算，将一个数组转为用逗号分隔的参数序列。\r\n\r\n``` javascript\r\nconsole.log(...[1, 2, 3]);\r\n// 1 2 3\r\n```\r\n"}}
{"actor":{"display_login":"cobish"}}