We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2f158f commit 0b7d15eCopy full SHA for 0b7d15e
1 file changed
calc.js
@@ -41,7 +41,14 @@ for (item of buttons) {
41
} else {
42
screen.classList.remove("negative");
43
}
44
- } else if (isNumber(buttonText)) {
+ } else if(buttonText=="(" || buttonText==")") {
45
+ if(flag==1){
46
+ flag =0;
47
+ }
48
+ screenValue+=buttonText;
49
+ screen.value=screenValue;
50
51
+ else if (isNumber(buttonText)) {
52
if (flag == 1) {
53
screenValue = buttonText;
54
flag = 0;
0 commit comments