We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d6a7d7 commit 963a220Copy full SHA for 963a220
1 file changed
task01-change-and-revert-heading/script.js
@@ -1,16 +1,16 @@
1
const heading = document.getElementById("heading");
2
const button = document.getElementById("clickBtn");
3
4
-const originalText = Heading.textContent;
5
-const newText = "Hello World";
+const originalText = heading.textContent;
+const newText = "Changed Text";
6
7
button.addEventListener("click", () => {
8
- if (Heading.textContent === originalText) {
9
- Heading.textContent = newText;
+ if (heading.textContent === originalText) {
+ heading.textContent = newText;
10
button.textContent = "Click to Revert";
11
}
12
else {
13
- Heading.textContent = originalText;
14
- button.textContent = "Click here to Change";
+ heading.textContent = originalText;
+ button.textContent = "Click Here to Change";
15
16
})
0 commit comments