Skip to content

Commit

Permalink
readMeupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
dzc1 committed Aug 15, 2023
1 parent a912fa2 commit 467c102
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,14 @@ Check our live example bot and try out a few different answers to see the differ

## Stretch Goals

So you’ve completed the blue level? Great job! Make sure you've committed and pushed a version of your project before starting on the stretch goals. Remember that the stretch goals are optional.
So you’ve completed all the iterations above? Great job! Make sure you've committed and pushed a version of your project before starting on the stretch goals. Remember that the stretch goals are optional.

- Work on your CSS skills, and change the styling.
- How is the user answering the questions? Choose the form elements that you think fit the purpose best.
- Add sound effects to the chat.
- Refactor the code to learn more about different approaches with functions
- Hint:
In the examples above, we have made it where each function knows which is the next function to load (so in `handleNameInput`, it calls `showFoodOptions` as it knows this is the next step in the flow). This is ok, and is just one of many approaches you could choose to take here.
Another option is to make a more generic `askNextQuestion` function which keeps track of the current question and then invokes other functions based on what is next. This is a better approach as the project grows and you potentially have many steps, but it can be more complicated to start with as it means you have to think abstractly from the beginning.
A good idea is to get everything working with the more explicit approach of one answer handler calling the next question function, before refactoring your code to abstract things and make it easier to add more questions.
- Use setTimeout() to show the user that the bot is processing/loading/typing if you choose to use setTimeout() for all the bot's answers

0 comments on commit 467c102

Please sign in to comment.