We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ce34f5 commit 5e189b4Copy full SHA for 5e189b4
1 file changed
script.js
@@ -1,3 +1,18 @@
1
+const app = document.getElementById('app');
2
+
3
+// Generate and inject the HTML content
4
+app.innerHTML = `
5
+ <main class="container">
6
+ <h1>JavaScript Counter</h1>
7
+ <div class="counter_container">
8
+ <button id="subtract" aria-label="Decrement"><i class="fas fa-minus"></i></button>
9
+ <span id="output">0</span>
10
+ <button id="add" aria-label="Increment"><i class="fas fa-plus"></i></button>
11
+ </div>
12
+ <button id="reset" aria-label="Reset"><i class="fas fa-sync-alt"></i> Reset</button>
13
+ </main>
14
+`;
15
16
// Cache DOM elements for performance
17
const addButton = document.querySelector("#add");
18
const subtractButton = document.querySelector("#subtract");
0 commit comments