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 1966aac commit 790c614Copy full SHA for 790c614
debugging/book-library/script.js
@@ -88,13 +88,8 @@ function render() {
88
changeBut.id = i;
89
changeBut.className = "btn btn-success";
90
wasReadCell.appendChild(changeBut);
91
- let readStatus = "";
92
- if (myLibrary[i].check == false) {
93
- readStatus = "Yes";
94
- } else {
95
- readStatus = "No";
96
- }
97
- changeBut.innerText = readStatus;
+
+ changeBut.textContent = myLibrary[i].check ? "Yes" : "No";
98
99
changeBut.addEventListener("click", function () {
100
myLibrary[i].check = !myLibrary[i].check;
0 commit comments