Skip to content

Commit 25dbecf

Browse files
committed
feat(JS): create clearHistoryBtn element
1 parent 89aa47b commit 25dbecf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
<div data-value=")" data-operator class="child operator">)</div>
3636
</div>
3737
<ul class="computation-history">
38+
<button class="clear-history-btn">clear history</button>
3839

39-
4040
</ul>
4141

4242

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ let screen = document.querySelector("[data-screen]");
44
const historyBtn = document.querySelector(".history-btn");
55
const slidingPart = document.querySelector(".sliding-part");
66
const operators = document.querySelectorAll("[data-operator]");
7+
const clearHistoryBtn = document.querySelector(".clear-history-btn");
8+
79

810

911
const operatorRegex = /[\/*\-+]/;

0 commit comments

Comments
 (0)