Add Items to a List
Write the code, see it run, pass the checks.
The problem
- easy
- Code
Build a shopping list: an input labelled "New item", an "Add" button and a list below. Add puts the text at the end of the list and empties the input. Blank text adds nothing. Give each list item a stable key.
Your code must pass
- Add puts the item in the list
- Items stay in the order they were added
- Add empties the input
- Blank text adds nothing