1
switch (e.target.value) {
case "A/C":
console.log('ae')
break;
case "C":
break;
case "X":
break;
case ".":
break;
case "%":
break;
case "-":
break;
case "√":
break;
case "+":
break;
case "÷":
break;
case "=":
break;
**case IsNumber():
console.log('é um numero')
break;**
}
I am developing a calculator in JS. I would like to receive the numeric keys to make some functions equal for all of them. Is it possible to recognize if the key clicked.value is a number on the switch? Or I will have to do key by key, or maybe a statemente, etc?
Beauty. Thank you very much !!
– Vitor Mendonça