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 5c4c90a commit eb4585cCopy full SHA for eb4585c
1 file changed
debugging/book-library/script.js
@@ -31,14 +31,7 @@ function submit() {
31
const authorVal = authorInput.value.trim();
32
const pagesVal = parseInt(pagesInput.value, 10);
33
34
- if (
35
- titleVal == null ||
36
- titleVal == "" ||
37
- authorVal == null ||
38
- authorVal == "" ||
39
- isNaN(pagesVal) ||
40
- pagesVal <= 0
41
- ) {
+ if (titleVal === "" || authorVal === "" || isNaN(pagesVal) || pagesVal < 1) {
42
alert("Please fill all fields!");
43
return false;
44
} else {
0 commit comments