|
form.addEventListener('click', removeTask); |
The task removal logic doesn't work at all. Should be:
taskList.addEventListener('click', removeTask);
|
if (taskInput.value === "") { |
|
alert("Add a task"); |
|
} |
There should be a
return statement after the
alert
Because of the
conditional branching above, this line might be skipped. So let's move it to the top of
the function
|
<ul class="collection"> |
|
<a href="#" class="clear-tasks btn black" id="clearme"> |
|
Clear Tasks |
|
</a> |
|
</ul> |
The
clear-tasks button deletes itself when you click on it. So it should be changed to:
<a href="#" class="clear-tasks btn black" id="clearme">
Clear Tasks
</a>
<ul class="collection">
</ul>
app_es6.js:56 Uncaught ReferenceError: e is not defined
at UI.showAlert (app_es6.js:56:9)
at HTMLFormElement.<anonymous> (app_es6.js:94:12)
showAlert @ app_es6.js:56
(anonymous) @zapp_es6.js:94
The page reloads and all books are cleared after the submit button is pressed: the logic of the app is broken.
preventDefault should be placed at the top of
the function
My_JavaScript_Projects/Task List/app.js
Line 17 in e5475bb
The task removal logic doesn't work at all. Should be:
taskList.addEventListener('click', removeTask);My_JavaScript_Projects/Task List/app.js
Lines 29 to 31 in e5475bb
There should be a
returnstatement after thealertMy_JavaScript_Projects/Task List/app.js
Line 58 in e5475bb
Because of the conditional branching above, this line might be skipped. So let's move it to the top of the function
My_JavaScript_Projects/Task List/index.html
Lines 35 to 39 in e5475bb
The
clear-tasksbutton deletes itself when you click on it. So it should be changed to:My_JavaScript_Projects/Book List/app_es6.js
Line 56 in e5475bb
My_JavaScript_Projects/Book List/app_es6.js
Line 95 in e5475bb
The page reloads and all books are cleared after the submit button is pressed: the logic of the app is broken.
preventDefaultshould be placed at the top of the function