Now it is time to add the remaining properties to the taskObj
object.
Retrieve the values from the titleInput
, dateInput
, and descriptionInput
fields, and then save them in the properties title
, date
, and description
of the taskObj
object.
Add a new task and open up the console to see the taskObj
object with the new properties.
Tell us what’s happening:
title: ${titleInput.value}
,
date: ${dateInput.value}
,
description: ${descriptionInput.value}
,
}
console.log(taskObj);
and
title: titleInput.value
date: dateInput.value
description: descriptionInput.value
and things like this:
const titleInput = document.getElementById(“title-input”);
const dateInput = document.getElementById(“date-input”);
const descriptionInput = document.getElementById(“description-input”);
I am just at a point where I am trying everything. Help.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
title: `${titleInput.value}`,
date: `${dateInput.value}`,
description: `${descriptionInput.value}`,
}
console.log(taskObj);
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Challenge Information:
Learn localStorage by Building a Todo App - Step 19