{"action":"opened","issue":{"url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/772","repository_url":"https://api.github.com/repos/getify/You-Dont-Know-JS","labels_url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/772/labels{/name}","comments_url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/772/comments","events_url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/772/events","html_url":"https://github.com/getify/You-Dont-Know-JS/issues/772","id":162273262,"number":772,"title":"ES6 & Beyond, Spread/Rest","user":{"login":"anirudh-modi","id":16587779,"avatar_url":"https://avatars.githubusercontent.com/u/16587779?v=3","gravatar_id":"","url":"https://api.github.com/users/anirudh-modi","html_url":"https://github.com/anirudh-modi","followers_url":"https://api.github.com/users/anirudh-modi/followers","following_url":"https://api.github.com/users/anirudh-modi/following{/other_user}","gists_url":"https://api.github.com/users/anirudh-modi/gists{/gist_id}","starred_url":"https://api.github.com/users/anirudh-modi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anirudh-modi/subscriptions","organizations_url":"https://api.github.com/users/anirudh-modi/orgs","repos_url":"https://api.github.com/users/anirudh-modi/repos","events_url":"https://api.github.com/users/anirudh-modi/events{/privacy}","received_events_url":"https://api.github.com/users/anirudh-modi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-25T09:43:42Z","updated_at":"2016-06-25T09:43:42Z","closed_at":null,"body":"I was trying this code below:\r\n\r\n````javascript\r\nvar name = 'sky';\r\nvar f = ...name; //SyntaxError: Unexpected token ..\r\n\r\nvar g = [...name]; // [\"s\",\"k\",\"y\"];\r\n````\r\n\r\nThis leads to the question, where can the spread operator be used, because when I tried using to assign to variable it fails, however when I am using it in `array` it spreads the value across the array."}}
{"actor":{"display_login":"anirudh-modi"}}