3
I have a calculator that works more or less like this:
[bolas][+][preco da bola]
I see the string replacing [XXXXXXX] with the corresponding value and use Eval to perform the calculation. But there may be cases of error when for example the calculation gets like this:
eval("5 + [preco da bola]");
- The JS code stops when this error occurs?
- If the code stops I have a way to prevent it from running?
- I can detect the error and send a custom Alert?
good question! :)
– Wallace Maxters