D
D
Dmitry Vasiliev2015-11-08 21:34:15
JavaScript
Dmitry Vasiliev, 2015-11-08 21:34:15

How can I make it print 'Error!'?

I wrote a simple calculator and I can’t make a feature when you enter the NaN expression
For example: 88++990(. Well, in short, rubbish)) and to display "Error" in the input line.
Here is the calculator itself -> lol

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
afishr, 2015-11-08
@afishr

I think it's worth using the function
isNaN()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question