{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6249","repository_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6249/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6249/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6249/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/6249","id":127079026,"number":6249,"title":"Testing Objects for Properties","user":{"login":"moksha1","id":16658634,"avatar_url":"https://avatars.githubusercontent.com/u/16658634?v=3","gravatar_id":"","url":"https://api.github.com/users/moksha1","html_url":"https://github.com/moksha1","followers_url":"https://api.github.com/users/moksha1/followers","following_url":"https://api.github.com/users/moksha1/following{/other_user}","gists_url":"https://api.github.com/users/moksha1/gists{/gist_id}","starred_url":"https://api.github.com/users/moksha1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moksha1/subscriptions","organizations_url":"https://api.github.com/users/moksha1/orgs","repos_url":"https://api.github.com/users/moksha1/repos","events_url":"https://api.github.com/users/moksha1/events{/privacy}","received_events_url":"https://api.github.com/users/moksha1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-01-17T07:06:27Z","updated_at":"2016-12-23T13:20:45Z","closed_at":"2016-01-17T07:26:10Z","body":"Challenge [Testing Objects for Properties]\nUser Agent is: <code>Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0</code>.\n\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\n\nMy code:```javascript\n\n// Setup\nvar myObj = {\n  gift: \"pony\",\n  pet: \"kitten\",\n  bed: \"sleigh\"  };\n\nfunction checkObj(checkProp) {\n  // Your Code Here\n\nif (myObj.hasOwnProperty(\"checkProp\")=== true); \n  {return myObj[checkProp];}  \n return \"Not Found\" ;   }\n\n// Test your code by modifying these values\ncheckObj(\"house\");\n\n```\nI'm using a firefox browser and cannot get a screen-shot to paste - sorry.  My issue is the final  'return \"Not Found\";  ' statement in this exercise will not execute when the condition is false.  I checked the format of this exercise with one from a previous exercise (Chaining If Else Statements), and it is the same basic format once you comment out the extra if-else statements there.  I did not find any other solutions in Git Hub or elsewhere online. I did notice some people used an 'else' in front of ' return \"Not Found\" ;  ', but when I attempt it, I get an error, otherwise, the editor does not show any other errors for my code.  \n```\n"},"comment":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/comments/268988827","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/6249#issuecomment-268988827","issue_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/6249","id":268988827,"user":{"login":"stanchev88","id":24293714,"avatar_url":"https://avatars.githubusercontent.com/u/24293714?v=3","gravatar_id":"","url":"https://api.github.com/users/stanchev88","html_url":"https://github.com/stanchev88","followers_url":"https://api.github.com/users/stanchev88/followers","following_url":"https://api.github.com/users/stanchev88/following{/other_user}","gists_url":"https://api.github.com/users/stanchev88/gists{/gist_id}","starred_url":"https://api.github.com/users/stanchev88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanchev88/subscriptions","organizations_url":"https://api.github.com/users/stanchev88/orgs","repos_url":"https://api.github.com/users/stanchev88/repos","events_url":"https://api.github.com/users/stanchev88/events{/privacy}","received_events_url":"https://api.github.com/users/stanchev88/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T13:20:45Z","updated_at":"2016-12-23T13:20:45Z","body":"You can even omit === true from the conditional statement since the only output which Boolean datatype produce is either true or false :\r\n\r\nif (myObj.hasOwnProperty(\"checkProp\"));\r\n{return myObj[checkProp];}\r\nreturn \"Not Found\" ; }\r\n"}}
{"actor":{"display_login":"stanchev88"}}