{"action":"created","issue":{"url":"https://api.github.com/repos/qingfengmy/blogs/issues/43","repository_url":"https://api.github.com/repos/qingfengmy/blogs","labels_url":"https://api.github.com/repos/qingfengmy/blogs/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/qingfengmy/blogs/issues/43/comments","events_url":"https://api.github.com/repos/qingfengmy/blogs/issues/43/events","html_url":"https://github.com/qingfengmy/blogs/issues/43","id":348208509,"node_id":"MDU6SXNzdWUzNDgyMDg1MDk=","number":43,"title":"数组函数","user":{"login":"qingfengmy","id":4978379,"node_id":"MDQ6VXNlcjQ5NzgzNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4978379?v=4","gravatar_id":"","url":"https://api.github.com/users/qingfengmy","html_url":"https://github.com/qingfengmy","followers_url":"https://api.github.com/users/qingfengmy/followers","following_url":"https://api.github.com/users/qingfengmy/following{/other_user}","gists_url":"https://api.github.com/users/qingfengmy/gists{/gist_id}","starred_url":"https://api.github.com/users/qingfengmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qingfengmy/subscriptions","organizations_url":"https://api.github.com/users/qingfengmy/orgs","repos_url":"https://api.github.com/users/qingfengmy/repos","events_url":"https://api.github.com/users/qingfengmy/events{/privacy}","received_events_url":"https://api.github.com/users/qingfengmy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-07T07:56:10Z","updated_at":"2018-08-07T08:04:14Z","closed_at":null,"author_association":"OWNER","body":"### 1. splice\r\nsplice的意思是 粘接。\r\n它是数组的函数。\r\n它的作用是操作数组（增删改）\r\n参数是(index,howmany,item1,item2,...);返回值是被删除的项目。\r\n```\r\nindex: 必须，整数，操作的位置\r\nhowmany: 必须，整数，要删除的项目数量，如果为0则不会删除\r\nitem1...: 非必须，向数组添加的项目。\r\n```\r\n注意： splice会操作当前array.\r\n```\r\nvar arr = ['a','b','c']\r\n// 增\r\nvar result = arr.splice(1,0,'d'); // arr: a,d,b,c; result: []\r\n// 删\r\nvar result = arr.splice(1,1);// arr: a,b,c; result: ['d']\r\n// 改\r\nvar result = arr.splice(1,1,'e');// arr: a,e,c; result: ['b']\r\n```"},"comment":{"url":"https://api.github.com/repos/qingfengmy/blogs/issues/comments/410970582","html_url":"https://github.com/qingfengmy/blogs/issues/43#issuecomment-410970582","issue_url":"https://api.github.com/repos/qingfengmy/blogs/issues/43","id":410970582,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDk3MDU4Mg==","user":{"login":"qingfengmy","id":4978379,"node_id":"MDQ6VXNlcjQ5NzgzNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4978379?v=4","gravatar_id":"","url":"https://api.github.com/users/qingfengmy","html_url":"https://github.com/qingfengmy","followers_url":"https://api.github.com/users/qingfengmy/followers","following_url":"https://api.github.com/users/qingfengmy/following{/other_user}","gists_url":"https://api.github.com/users/qingfengmy/gists{/gist_id}","starred_url":"https://api.github.com/users/qingfengmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qingfengmy/subscriptions","organizations_url":"https://api.github.com/users/qingfengmy/orgs","repos_url":"https://api.github.com/users/qingfengmy/repos","events_url":"https://api.github.com/users/qingfengmy/events{/privacy}","received_events_url":"https://api.github.com/users/qingfengmy/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T08:04:14Z","updated_at":"2018-08-07T08:04:14Z","author_association":"OWNER","body":"### findIndex\r\n```\r\n[1,2,{price:3},{price:4}].findIndex(item=>item.price==4)\r\n// 3\r\n```"}}
{"actor":{"display_login":"qingfengmy"}}