Perform a GET request, having changed the q query parameter in their API URI to search for more information on the correct Jeopardy answer. Their API URI is: https://api.duckduckgo.com/?q=REPLACEME&format=json&pretty=1.
Because we're passing an answer string through the URI (as a query parameter), and the answer string might contain characters which are accidentally meaningful in URIs (like an ampersand), and therefore could break our request, let's play it safe and encode the string first using encodeURI(). (2 points)
On a guess, display at least one valid "InstantAnswer" value (if any) from your DuckDuckGo request. Don't choose randomly. Identify useful properties in the hydrated InstantAnswer object, then check to see if any of those have content. (5 points)
As DuckDuckGo instructs, attribute DuckDuckGo in your page and use a descriptive t parameter. (required)
Refactor your Jeopardy app to use your Grid and Cell classes, and to be organized in terms of categories and difficulty values (dollar values), just like in the real game. (5 points)
When retrieving Jeopardy questions, validate that neither the question nor the answer are empty and that they don't contain HTML artifacts. If they are invalid, skip and find another. It's easier than trying to remove the HTML. You can use this RegEx function to test for HTML tags and HTML entities: const containsHTML = text => /(<.+?>)|(&.{1,6}?;)/.test(text);. (2 points)
Notice that jService accepts feedback from users to increment an "invalid_count" property on their questions. (They have an /api/invalid?id= endpoint just for this reporting, which we're not going to use.) Anything with an invalid_count should be skipped, too. (1 point)
Escaped characters (e.g. \") are easy to deal with, so just remove the slash from these strings. (2 points)
Submission Guidelines
Fork this repo and clone it to your machine.
Enable GitHub Pages for your repo.
Add your code, per the instructions above.
Push your completed code to your own repo.
Submit a pull request to the original repo.
On the PR, add a comment with a link to your GitHub Page for your project.