Hi everyone,
I’m trying to make an ID unique by following these instructions:
Embed the value inside ${}.
Add a unique number to the ID.
My current code looks like this:
javascript
id: ${titleInput.value.toLowerCase().split(" ").join("-")}
I’ve tried the Read-Search-Ask approach, but I’m still stuck. Can anyone help me figure out how to correctly add a unique number to make the ID truly unique?
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
id : `${titleInput.value.toLowerCase().split(" ").join("-")}`
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Challenge Information:
Learn localStorage by Building a Todo App - Step 17