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 2ae72b2 commit b14d36aCopy full SHA for b14d36a
19. Color Toggler/app.js
@@ -1,13 +1,9 @@
1
let toggler = document.getElementById("switch");
2
3
toggler.addEventListener("click", () => {
4
- // if (toggler.checked === true) {
5
- // document.body.style.backgroundColor = "black";
6
- // } else {
7
- // document.body.style.backgroundColor = "white";
8
- // }
9
10
toggler.checked === true
11
? (document.body.style.backgroundColor = "black")
12
: (document.body.style.backgroundColor = "white");
+
13
});
0 commit comments