Created
January 20, 2019 02:11
-
-
Save thebinarypenguin/91baf4c95e12d8b503692279b432ad94 to your computer and use it in GitHub Desktop.
Thinkful Assignment: Shopping List Pseudocode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assignment: Provide pseudo code for the following user stories. | |
1. You should be able to add items to the list | |
The UI will have a form with an "item name" text input and an "add item" | |
submit button. | |
When the form is submitted, catch the event and call an "add item function" | |
followed by a "render shopping list" function | |
The "add item" function should add the item to the data store | |
The "render shopping list" function should loop over the data store, | |
build the html for the shopping list, and replace the html of the current | |
shopping list DOM element with the new html just constructed | |
Done | |
2. You should be able to check items on the list | |
The UI will have a "check" button for each shopping list item | |
When the "check" button is "clicked", catch the event and call a | |
"toggle item checked" function followed by a "render shopping list" | |
function | |
The "toggle item checked" function should find the item in the data store | |
and toggle its "checked" property | |
The "render shopping list" function should loop over the data store, | |
build the html for the shopping list, and replace the html of the current | |
shopping list DOM element with the new html just constructed | |
Done | |
3. You should be able to delete items from the list | |
The UI will have a "delete" button for each shopping list item | |
When the "delete" button is "clicked", catch the event and call a | |
"delete item" function followed by a "render shopping list" function | |
The "delete item" function should find the item in the data store and | |
remove it | |
The "render shopping list" function should loop over the data store, | |
build the html for the shopping list, and replace the html of the current | |
shopping list DOM element with the new html just constructed | |
Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment