Beginner
A shopping list with add and undo
Make the shopping list work. The list is stored in the items array.
Add puts the text from the box at the end of items (ignore empty or spaces-only text), clears the box, and redraws.
Remove last takes the last item off and redraws.
render() shows every item as an <li> in #list and the number of items in #count, like 2 items.
What Check tests
- Adding Milk then Eggs shows them in that order
- The count shows 2
- Empty or spaces-only text is not added
- The box is cleared after adding
- Remove last takes off the last item only
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.