thisismythreebag-woooo
v2.3.1
Published
The project adopts a modular devele reuse and maintainability
Downloads
6
Maintainers
Readme
This JavaScript file, index.js
, is responsible for managing tasks within an application. It defines modules and functions to add tasks, display tasks, and handle task addition events.
The tasks
array serves as a storage for task-related data.
The addTask
function adds a new task to the tasks
array.
The displayTasks
function iterates through the tasks
array and logs each task's name and deadline to the console.
The handleAddTask
function handles the submission event of the task addition form. It prevents the default form submission behavior, retrieves task name and deadline inputs, creates a new task object, adds it to the tasks
array, displays the updated task list, and clears the input fields.
Upon page load, the script initializes by attaching an event listener to the task addition form submission event.
This script provides basic task management functionality for the application.