Question: 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())
}
 Step 2: CRUD Create 4 functions in your script.js file: function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!