Some web designers have built a simple to-do list application, which should allow you to make a list of tasks you need to do. They need somebody to complete the logic for manipulating the array of to-do items. There are some blank functions in HOMEWORK.js
, which will be called when you press particular buttons in the web page. You just need to make those functions do the right thing to the array of items.
You can see a demo of a complete product by clicking here
- Open
index.html
in a modern web browser (eg. Firefox, Google Chrome). - Open
HOMEWORK.js
in your text editor. - Add the necessary logic to complete the empty functions.
- Refresh the page in your web browser after each change to get the updated code.
The web designers would like the to-do list application to have the following features:
- Allow you to add new to-do list items by typing the task in the box and clicking 'add'.
- Remove to-do list items by clicking the cross on the right of each item.
- Mark the to-do as completed when you click on the tick on the left of each item.
There are some buttons beneath the list of to-do items which, from left to right, should:
- Clear all items from the list, for you to start again
- Sort the list alphabetically, so that it is neat.
- Reverse the order of the list, so it is in the other direction
- Clear all completed items from the list, to make space for tasks still to do
- Add exclamation marks to all to-do items, so that you will do them faster
- Display a box with the first item in the list that is not marked as done, so you know what to do first