Skip to content

Commit 8e35184

Browse files
committed
feat(CSS): add functionality to add add li element within ul element
1 parent 823b508 commit 8e35184

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
<div data-value="(" data-operator class="child operator">(</div>
3535
<div data-value=")" data-operator class="child operator">)</div>
3636
</div>
37-
<div class="computation-history">
38-
hello
37+
<ul class="computation-history">
38+
3939

40-
</div>
40+
</ul>
4141

4242

4343

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,13 @@ function userClicksOnEqualButton(button) {
205205
history.push(replacedArray.join(""))
206206
console.log(history);
207207

208+
208209
displayResult(replacedArray, result);
209210
screen.innerText = !Number.isFinite(result) ? "You cannot divide by zero. Press AC" : result;
210211
// divideByZero(screen, result);
211212
data = [];
212213
data.push(result);
214+
computationHistory.innerHTML += `<li>${history}</li>`
213215
}
214216
} catch (e) {
215217
screen.innerText = `${e.name} press AC`;

0 commit comments

Comments
 (0)