Skip to content

Commit 7d6a7d7

Browse files
authored
Update script.js
1 parent 9c31eda commit 7d6a7d7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

task05-change-style-on-click/script.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let isUpdated = false;
88
button.addEventListener("click", () => {
99
if (!isUpdated) {
1010
heading.textContent = newtext;
11-
heading.style.backgroundColor = "white";
11+
heading.style.backgroundColor = "red";
1212
heading.style.color = "black";
1313
button.textContent = "Click to Revert";
1414
isUpdated = true;
@@ -20,4 +20,5 @@ button.addEventListener("click", () => {
2020
button.textContent = "Click to Change";
2121
isUpdated = false;
2222
}
23-
});
23+
24+
});

0 commit comments

Comments
 (0)