+ 2

Please someone check my code calculator. In this code I want to make only one button for addition substract multiply and divide.

Please tell my how to make it Im not able to make only one button please help me

1st Oct 2020, 6:30 AM
Ayush Anjan
Ayush Anjan - avatar
1 Antwort
+ 1
<button class= "add"> + </button> js..... document.getElementsByClassName("add")[0].addEventListener("click", function(){ let value_1 =prompt(typeof(parseInt("type a number"))) let value_2 = prompt(typeof (parseInt("type another number"))); alert(value_1 + value_2); },false)
1st Oct 2020, 6:46 AM
LIONEL
LIONEL - avatar