Create a NodeJS/JavaScript application that manages a to-do list.
- The app should include features such as adding new tasks, marking tasks as completed, deleting tasks,
filtering the list by completed or incomplete tasks, and sorting tasks by the due date or priority. - To create the Task object with properties like task description, due date, and priority level, use prototypes.
- Manage the list of tasks using arrays and array methods such as push(), filter(), and sort().
- When a user adds a new task, create a new Task object and add it to the array.
- When a user marks a task as completed, use filter() to find the task in the array and update its status.
- When a user deletes a task, remove it from the array using splice().
- You mean need to use something like (stdin) to read input from the user (Google it )
- Print for the user a list of actions that he can do.
***************************
Welcome to JS TODO-APP
***************************
Select an action:
- Add a new task
- List all tasks
- List completed tasks
- Mark the task as done
- Delete a task
- Sort tasks by the due date
- Sort tasks by priority
- Clear all tasks
***************************
What's your choice?