We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdefee3 commit 3d908a8Copy full SHA for 3d908a8
index.js
@@ -21,9 +21,10 @@ btns.forEach((btn) => {
21
userClicksOnEqualButton(buttonValue);
22
23
24
- if (Number(buttonValue) === 0 && screen.innerText.startsWith("0.")) {
25
- screen.innerText += buttonValue;
26
- }
+ handlingZeroFollowedByAdecimal(buttonValue)
+
27
28
if (!isNaN(Number(buttonValue))) {
29
screen.innerText = buttonValue;
30
data.push(screen.innerText);
@@ -215,3 +216,9 @@ function insertClosingParenthesis(button) {
215
216
screen.innerText = data.join("");
217
}
218
219
220
+function handlingZeroFollowedByAdecimal(button) {
221
+ if (Number(button) === 0 && screen.innerText.startsWith("0.")) {
222
+ screen.innerText += buttonValue;
223
+ }
224
+}
0 commit comments