Skip to content

Instantly share code, notes, and snippets.

@verdi327
Created March 29, 2019 15:53
Show Gist options
  • Save verdi327/2be97f14b468ea11da205c0e7b418863 to your computer and use it in GitHub Desktop.
Save verdi327/2be97f14b468ea11da205c0e7b418863 to your computer and use it in GitHub Desktop.
Shopping List Pseudo Code
function addNewItem(store, name) {
// create a new item object
// add it to the store array
}
function toggleCompleted(store, name) {
// find item by name in the store array
// update the completed property to be the opposite of what it is currently
}
function removeItem(store, name) {
// filter the store array to exclude the item passed in
// save the new store array
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment