{"action":"created","issue":{"url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/1413","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/1413/labels{/name}","comments_url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/1413/comments","events_url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/1413/events","html_url":"https://github.com/getify/You-Dont-Know-JS/issues/1413","id":407484223,"node_id":"MDU6SXNzdWU0MDc0ODQyMjM=","number":1413,"title":"Adding that sum is the return of the previous function return","user":{"login":"impactcolor","id":4460178,"node_id":"MDQ6VXNlcjQ0NjAxNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/4460178?v=4","gravatar_id":"","url":"https://api.github.com/users/impactcolor","html_url":"https://github.com/impactcolor","followers_url":"https://api.github.com/users/impactcolor/followers","following_url":"https://api.github.com/users/impactcolor/following{/other_user}","gists_url":"https://api.github.com/users/impactcolor/gists{/gist_id}","starred_url":"https://api.github.com/users/impactcolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impactcolor/subscriptions","organizations_url":"https://api.github.com/users/impactcolor/orgs","repos_url":"https://api.github.com/users/impactcolor/repos","events_url":"https://api.github.com/users/impactcolor/events{/privacy}","received_events_url":"https://api.github.com/users/impactcolor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-02-06T23:50:56Z","updated_at":"2019-02-07T01:22:12Z","closed_at":null,"author_association":"NONE","body":"In:\r\n.then( function(sum){\r\n\tconsole.log( sum ); // that was easier!\r\n\r\nIt would be helpful for a newbie to explain that \"sum\" can be named anything and that it is the return of the previous function return statement.  This logically explains that the then is expecting a return:\r\n\r\n// sum here can be named any variable you choose and it will be filled by the return value that just occurred before .then.  \r\n.then( function(sum){\r\n\tconsole.log( sum ); // that was easier!"},"comment":{"url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/comments/461254682","html_url":"https://github.com/getify/You-Dont-Know-JS/issues/1413#issuecomment-461254682","issue_url":"https://api.github.com/repos/getify/You-Dont-Know-JS/issues/1413","id":461254682,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MTI1NDY4Mg==","user":{"login":"impactcolor","id":4460178,"node_id":"MDQ6VXNlcjQ0NjAxNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/4460178?v=4","gravatar_id":"","url":"https://api.github.com/users/impactcolor","html_url":"https://github.com/impactcolor","followers_url":"https://api.github.com/users/impactcolor/followers","following_url":"https://api.github.com/users/impactcolor/following{/other_user}","gists_url":"https://api.github.com/users/impactcolor/gists{/gist_id}","starred_url":"https://api.github.com/users/impactcolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impactcolor/subscriptions","organizations_url":"https://api.github.com/users/impactcolor/orgs","repos_url":"https://api.github.com/users/impactcolor/repos","events_url":"https://api.github.com/users/impactcolor/events{/privacy}","received_events_url":"https://api.github.com/users/impactcolor/received_events","type":"User","site_admin":false},"created_at":"2019-02-07T01:22:12Z","updated_at":"2019-02-07T01:22:12Z","author_association":"NONE","body":"Yes because it's talking programming lingo.  So to a newbie it's a little confusing...  In example \"we chain-call ... to wait for the resolution of that returned promise.\"  Resolution... promise... what? Considering we're barely learning about promises.  Also function(sum) <- why \"sum\" does it always have to be sum?   That's why I had suggested this:  // sum here can be named any variable you choose and it will be filled by the return value that just occurred before.  This is just a suggestion of course.  This book is phenomenal and the explanation is great.  But I did  have to think that for a while where was sum coming from?  Did I declare sum somewhere else?"}}
{"actor":{"display_login":"impactcolor"}}