Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We want to examine the input we read. If the value is wrong, an exception (err) is thrown. The exception (err) is caught by the

We want to examine the input we read. If the value is wrong, an exception (err) is thrown. The exception (err) is caught by the catch statement and a custom error message is displayed according to:

a- If the value entered is a number throw 'not a character" b- if the value read smaller than e return 'smaller than e'. c- if the value read greater than m return 'greater than m'.

Replace a-,b-,c- with the below statements.

Please input a letter between 'e' and 'm':

Which options are correct?

if(!isNaN(x)) throw "not a character";

if(x < 'd') throw "too low";

if(x > 'm') throw "too high";

if(isNaN(x)) throw "not a character";

if(x > 'd') throw "too low";

if(x < 'm') throw "too high"

if(!Number(x)) throw "not a character";

if(x > 'd') throw "too low";

if(x < 'm') throw "too high";

if(Number(x)) throw "not a character";

if(x < 'd') throw "too low";

if(x > 'm') throw "too high";

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Show that the right sides of Eqs. (11.7.9) and (11.7.8) are equal.

Answered: 1 week ago