{"action":"created","issue":{"url":"https://api.github.com/repos/nodeschool/discussions/issues/1661","repository_url":"https://api.github.com/repos/nodeschool/discussions","labels_url":"https://api.github.com/repos/nodeschool/discussions/issues/1661/labels{/name}","comments_url":"https://api.github.com/repos/nodeschool/discussions/issues/1661/comments","events_url":"https://api.github.com/repos/nodeschool/discussions/issues/1661/events","html_url":"https://github.com/nodeschool/discussions/issues/1661","id":139362636,"number":1661,"title":"Help with Recursion exercise of Functional Javascript is Good","user":{"login":"ajw650","id":16672413,"avatar_url":"https://avatars.githubusercontent.com/u/16672413?v=3","gravatar_id":"","url":"https://api.github.com/users/ajw650","html_url":"https://github.com/ajw650","followers_url":"https://api.github.com/users/ajw650/followers","following_url":"https://api.github.com/users/ajw650/following{/other_user}","gists_url":"https://api.github.com/users/ajw650/gists{/gist_id}","starred_url":"https://api.github.com/users/ajw650/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajw650/subscriptions","organizations_url":"https://api.github.com/users/ajw650/orgs","repos_url":"https://api.github.com/users/ajw650/repos","events_url":"https://api.github.com/users/ajw650/events{/privacy}","received_events_url":"https://api.github.com/users/ajw650/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T18:58:23Z","updated_at":"2016-03-08T19:11:54Z","closed_at":null,"body":"I am getting confused at the initial step of this problem.\r\n\r\n1module.exports = function getDependencies (tree) {\r\n2\tvar arr = Object.keys(tree);\r\n3\t\r\n4\t//arr.forEach(function (curr) {\r\n5\t//\tconsole.log(tree.curr);\r\n6\t//})\r\n7}\r\n\r\nThis code doesn't produce errors.  But, as soon as I uncomment out the forEach part, I get a type error: cannot convert undefined or null to object for the second line of my code (var arr = Object.keys(tree);).  Thank you in advance.\r\n\r\nAndrew"},"comment":{"url":"https://api.github.com/repos/nodeschool/discussions/issues/comments/193921668","html_url":"https://github.com/nodeschool/discussions/issues/1661#issuecomment-193921668","issue_url":"https://api.github.com/repos/nodeschool/discussions/issues/1661","id":193921668,"user":{"login":"noffle","id":489362,"avatar_url":"https://avatars.githubusercontent.com/u/489362?v=3","gravatar_id":"","url":"https://api.github.com/users/noffle","html_url":"https://github.com/noffle","followers_url":"https://api.github.com/users/noffle/followers","following_url":"https://api.github.com/users/noffle/following{/other_user}","gists_url":"https://api.github.com/users/noffle/gists{/gist_id}","starred_url":"https://api.github.com/users/noffle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noffle/subscriptions","organizations_url":"https://api.github.com/users/noffle/orgs","repos_url":"https://api.github.com/users/noffle/repos","events_url":"https://api.github.com/users/noffle/events{/privacy}","received_events_url":"https://api.github.com/users/noffle/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T19:11:54Z","updated_at":"2016-03-08T19:11:54Z","body":"What is the value of `tree` when called?\r\n\r\nAlso, watch out: `tree.curr` is equivalent to `tree[\"curr\"]`, which may not be your intention."}}