in Education by
JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation. (a) Prints an exception error (b) Prints an overflow error (c) Displays “Infinity” (d) Prints the value as such This question was posed to me in an interview for internship. I need to ask this question from Types, Values and Variables topic in portion Lexical Structures of JavaScript Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Right answer is (c) Displays “Infinity” To explain: When the result of a numeric operation is larger than the largest representable number (overflow), JavaScript prints the value as Infinity. Similarly, when a negative value becomes larger than the largest representable negative number, the result is negative infinity. The infinite values behave as you would expect: adding, subtracting, multiplying, or dividing them by anything results in an infinite value (possibly with the sign reversed).

Related questions

0 votes
    The basic difference between JavaScript and Java is _________ (a) There is no difference (b) Functions are ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    When an empty statement is encountered, a JavaScript interpreter __________ (a) Ignores the statement (b) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    When does JavaScript code appear inline within an HTML file? (a) Between the script tag (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    When does a cycle occur during memory leak? (a) No reference occurs (b) Two objects reference (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    How many reserved words are there in JavaScript? (a) 63 (b) 54 (c) 68 (d) 90 I have ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    The keyword or the property that you use to refer to an object through which they were invoked is _________ ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    When does the function name become optional in JavaScript? (a) When the function is defined as a looping ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    When is JavaScript called obtrusive? (a) JavaScript code is medium sized (b) JavaScript code is small (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
...