Capture quick ideas, add images to notes, check tasks off your To-Do list, and much more. One of the fundamental features for any productivity tool is a To-Do list. With the To-Do Tracker, you can create and share notes. The To-Do Tracker helps you to accomplish a set of tasks in order to achieve a goal wherever you are. In today’s world, many of us, use apps on our phones to manage our tasks. To-Do Tracker surfaces the right tasks at the right time, so you always know what to focus on next. Write a program to create a todo list for users. The users can add a todo to the list, remove a todo from the list and display all the todos in the list.
- Define functions called
- createATodo(todo) - to create a todo object,it takes a todo object as parameter and returns a Promise
- getAllTodos() - to get all the todos , returns a Promise object
- Use timer callbacks to make asynchronous calls. Implement Promise chaining so that only after a todo is created, the entire todo list will be display along with the newly created todo object.
- Call the createATodo method and add the todo object to the todolist.
- Use Promise chaining and ensure that the todolist is displayed only after the todo is added to the todolist and capture the errors.
- Download and unzip the boilerplate code.
- Run the command
npm install
to install the dependencies. - Open the boilerplate code in VSCode to develop the solution.
- Write the code in the .js files present in src folder
- Run the test scripts available under src/test by giving
npm run test
command in the terminal to test locally. - Refactor the solution to ensure all test cases are passing.
- Zip the solution code with the name same as assignment name.
- Upload the zipped solution for submission. "# todo-list"