{"action":"created","issue":{"url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/issues/84","labels_url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/issues/84/comments","events_url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/issues/84/events","html_url":"https://github.com/ga-dc/choose_your_own_adventure_js/pull/84","id":111747255,"number":84,"title":"choose your own adventure hw","user":{"login":"lewis2ba","id":13842987,"avatar_url":"https://avatars.githubusercontent.com/u/13842987?v=3","gravatar_id":"","url":"https://api.github.com/users/lewis2ba","html_url":"https://github.com/lewis2ba","followers_url":"https://api.github.com/users/lewis2ba/followers","following_url":"https://api.github.com/users/lewis2ba/following{/other_user}","gists_url":"https://api.github.com/users/lewis2ba/gists{/gist_id}","starred_url":"https://api.github.com/users/lewis2ba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewis2ba/subscriptions","organizations_url":"https://api.github.com/users/lewis2ba/orgs","repos_url":"https://api.github.com/users/lewis2ba/repos","events_url":"https://api.github.com/users/lewis2ba/events{/privacy}","received_events_url":"https://api.github.com/users/lewis2ba/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-16T02:42:44Z","updated_at":"2015-10-18T06:24:55Z","closed_at":"2015-10-18T06:24:55Z","pull_request":{"url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/pulls/84","html_url":"https://github.com/ga-dc/choose_your_own_adventure_js/pull/84","diff_url":"https://github.com/ga-dc/choose_your_own_adventure_js/pull/84.diff","patch_url":"https://github.com/ga-dc/choose_your_own_adventure_js/pull/84.patch"},"body":"completeness: 5\r\ncomfort: 3/5 - would have liked to do some error handling if the user typed in a weird response, but i did not know how to do this to make it ask the same question again."},"comment":{"url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/issues/comments/148983573","html_url":"https://github.com/ga-dc/choose_your_own_adventure_js/pull/84#issuecomment-148983573","issue_url":"https://api.github.com/repos/ga-dc/choose_your_own_adventure_js/issues/84","id":148983573,"user":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"created_at":"2015-10-18T06:24:55Z","updated_at":"2015-10-18T06:24:55Z","body":"If you want to do REAL error handling, look up Javascript's `try` and `catch` statements. But for now, you could try something like:\r\n\r\n```\r\nvar input;\r\nwhile([\"apple\", \"orange\", \"banana\"].indexOf(input) < 0){\r\n  input = prompt(\"Please enter a fruit.\");\r\n}\r\nalert(\"The fruit you entered was \" + input + \"!\");\r\n```"}}