We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 156a9e2 commit f1168d7Copy full SHA for f1168d7
projects/6-to-do-list/js/to-do.js
@@ -6,7 +6,9 @@ var itemInput = document.getElementById('todo-add-new');
6
var addToDo = function() {
7
var text = itemInput.value;
8
var item = document.createElement("li");
9
+ var listLength = list.children.length;
10
item.innerHTML = text;
11
+ item.id = "too-doo_" + (listLength + 1);
12
item.classList.add("todo__item");
13
list.appendChild(item);
14
itemInput.value = '';
0 commit comments