1.

What will be the step of the interpreter in a jump statement when an exception is thrown?(a) The interpreter stops its work(b) The interpreter throws another exception(c) The interpreter jumps to the nearest enclosing exception handler(d) The interpreter throws an errorI have been asked this question at a job interview.My question is taken from Loops in JavaScript in portion Lexical Structures of JavaScript

Answer»

Right OPTION is (c) The INTERPRETER jumps to the nearest ENCLOSING exception handler

Explanation: When an exception is thrown in a jump statement, the interpreter jumps to the nearest enclosing exception handler, which may be in the same function or up the call STACK in an INVOKING function.



Discussion

No Comment Found

Related InterviewSolutions