Hi everyone!
Step 12
Next, retrieve the values from the input fields and store them in a taskObj object. Each task should also have a unique id.
Create a taskObj object with an id property as the first property. For the value of the id property, retrieve the value of the titleInput field, convert it to lowercase, and then use the split() and join() methods to hyphenate it.
Make sure all of those are in template literals because you need the id property value as a string.
my code:
const taskObj = {
id: ${titleInput.value.toLowerCase().split(' ').join('-')}-${Date.now()}
,
title: titleValue,
date: dateValue,
description: descriptionValue,
};
Response:
Sorry, your code does not pass. Keep trying.
You should use .join('-')
on titleInput.value.toLowerCase().split(' ')
.
Please I need help on the above