+ 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
1 Odpowiedź
+ 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)