Guest User

Untitled

a guest
Dec 10th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. Add Function User Story
  2. 1) The user will be able to type an item into the input field.
  3. 2) The user will be able to add that item to the shopping list by pressing the add button.
  4. Pseudocode:
  5. 1) An event listener will be added to the form to check for submit.
  6. 2) The default behavior will be prevented for the form.
  7. 3) The value of the input field will be used to create a new object.
  8. 4) That object will be added to the Store.
  9. 5) The renderShoppingList function will be called to display the updated list.
  10.  
  11. Check Function User Story
  12. 1) The user will be able to add a strike through the item by pressing a button tied to the item.
  13. 2) The user will be able to remove a strike though the item by pressing a button tied to the item.
  14. Pseudocode:
  15. 1) An event listener will be added to the list, listening for clicks on the check button.
  16. 2) On click, the checked value of the object literal will be toggled.
  17. 3) The renderShoppingList function will be called to display the updated list.
  18.  
  19. Delete Function User Story
  20. 1) The user will be able to remove an item from the list by pressing a button tied to the item.
  21. Pseudocode:
  22. 1) An event listener will be added to the list, listening for clicks on the delete button.
  23. 2) On click, the associated value will be searched for in the array of objects, using the 'name' property.
  24. 3) Once found, the object will be popped from the array and discarded.
  25. 4) The renderShoppingList function will be called to display the updated list.
Add Comment
Please, Sign In to add comment