0

I a trying to create a calculator in android app.. the delete button does not work proper, which part of my code is worng

onEvent("backBtn", "click", function(event) { console.log("Delete button clicked"); click += 1; if(click === 1){ inputTwo = " "; setText("inputdisplay", inputOne + inputTwo); }else if(click === 2){ inputOne = " "; firstInput = true; setText("inputdisplay", inputOne + inputTwo); click = 0; } });

9th Oct 2020, 5:48 PM
Varsha Rao
1 Resposta
+ 2
which is initial value of click?
9th Oct 2020, 7:26 PM
Oma Falk
Oma Falk - avatar