-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
My_JavaScript_Projects/Task List/app.js
Line 17 in e5475bb
form.addEventListener('click', removeTask); |
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
if (taskInput.value === "") { | |
alert("Add a task"); | |
} |
There should be a
return
statement after the alert
My_JavaScript_Projects/Task List/app.js
Line 58 in e5475bb
e.preventDefault(); |
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
<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>
e.preventDefault(); |
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
e.preventDefault(); |
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 functionMetadata
Metadata
Assignees
Labels
No labels