{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/learnrx/issues/44","labels_url":"https://api.github.com/repos/ReactiveX/learnrx/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/learnrx/issues/44/comments","events_url":"https://api.github.com/repos/ReactiveX/learnrx/issues/44/events","html_url":"https://github.com/ReactiveX/learnrx/issues/44","id":53363989,"number":44,"title":"Reduce returns an array, not a value","user":{"login":"aeisenberg","id":363559,"avatar_url":"https://avatars.githubusercontent.com/u/363559?v=3","gravatar_id":"","url":"https://api.github.com/users/aeisenberg","html_url":"https://github.com/aeisenberg","followers_url":"https://api.github.com/users/aeisenberg/followers","following_url":"https://api.github.com/users/aeisenberg/following{/other_user}","gists_url":"https://api.github.com/users/aeisenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aeisenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeisenberg/subscriptions","organizations_url":"https://api.github.com/users/aeisenberg/orgs","repos_url":"https://api.github.com/users/aeisenberg/repos","events_url":"https://api.github.com/users/aeisenberg/events{/privacy}","received_events_url":"https://api.github.com/users/aeisenberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveX/learnrx/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-05T04:45:37Z","updated_at":"2015-10-22T19:52:55Z","closed_at":null,"body":"This was mentioned in comments of other issues, but I think it warrants it's own issue. The `reduce` implementation in the tutorial returns an array, not an object, which goes against the JS spec. For those people coming to this tutorial who are already familiar with JavaScript, this is more than a little confusing.\r\n\r\nI'd recommend either:\r\n\r\n1. Clarifying why the reduce implementation here is different from the one of the JS spec\r\n2. Changing the exercise so that reduce does return a single value.\r\n\r\nGreat tutorial! Lots of fun to go through the exercises."},"comment":{"url":"https://api.github.com/repos/ReactiveX/learnrx/issues/comments/150337474","html_url":"https://github.com/ReactiveX/learnrx/issues/44#issuecomment-150337474","issue_url":"https://api.github.com/repos/ReactiveX/learnrx/issues/44","id":150337474,"user":{"login":"webxl","id":264741,"avatar_url":"https://avatars.githubusercontent.com/u/264741?v=3","gravatar_id":"","url":"https://api.github.com/users/webxl","html_url":"https://github.com/webxl","followers_url":"https://api.github.com/users/webxl/followers","following_url":"https://api.github.com/users/webxl/following{/other_user}","gists_url":"https://api.github.com/users/webxl/gists{/gist_id}","starred_url":"https://api.github.com/users/webxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webxl/subscriptions","organizations_url":"https://api.github.com/users/webxl/orgs","repos_url":"https://api.github.com/users/webxl/repos","events_url":"https://api.github.com/users/webxl/events{/privacy}","received_events_url":"https://api.github.com/users/webxl/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T19:52:55Z","updated_at":"2015-10-22T19:52:55Z","body":"@MrNice Can you please explain \"our reduce behaves this way for the same reason you are forbidden from using bracket array access notation.\"\r\n\r\nGreat comment BTW, it inspired me to dive into the Array object a bit and clarify my understanding:\r\n\r\nhttps://tonicdev.com/webxl/array-return-types/\r\n\r\nFeedback welcome! "}}