Learn localStorage by Building a Todo App - Step 14

Tell us what’s happening: I am having trouble understanding the key relationship in taskObj. Here are the instructions: 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.

Your code so far

title: ${titleInput.value},
date: ${dateInput.value},
description: ${descriptionInput.value}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 14

Can you explain a little more about what you don’t understand about the relationship? It looks like you have used the template literals (the backticks don’t appear in these inline code snippets on the forum). Is your question relating to where do they come from? If so, if you look toward the top of the code, we defined those variables earlier. They are referencing the input fields from the HTML page after you click the button to create a new task.

I am trying to access the value of the variable and assign it to its respective key, but when I submit my code it doesn’t pass the tests. Am I butchering the syntax and or misunderstanding the directions?

Also! Thank you for any and all insight on this step! It has had me stumped for some time now

So I think the problem is that you have used template literals, but the instructions don’t require them for these key-value pairs (only that first one because we were doing some more complicated processing). This would probably work in reality but the course tests for an exact entry following the instructions.

That did it! Thank you for your help!