Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step 2 : CRUD Create 4 functions in your script.js file: function createTask ( ) { / / TODO: Pull in form data from DOM

Step 2: CRUD
Create 4 functions in your script.js file:
function createTask(){
// TODO: Pull in form data from DOM
// TODO: Format form data to Task Object
// TODO: Pull in tasks from local storage and push new one to task list array
// TODO: Save it to local storage
// TODO: Update DOM (Call readTasks())
}
// Hint - Look at the JavaScript code from lab 1B to see how to extract form data
function readTasks(){
I/ TODO: Clear current tasks to pot have duplicates
i/ TODO: Pull in tasks from local storage
}
// TODO: Parse tasks and Update DOM accordingly
function updateTask(id){
// TODO: Update the task in 'tasks' array by flipping it's 'done' value
// TODO: Save to local storage
}
// TODO: Update DOM (Call readTasks())
function deleteTask(id){
// TODO: Delete task from 'tasks' array
// TODO: Save to local storage
// TODO: Make the DOM update
// TODO: Update DOM (Call readTasks())
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions