Home » JavaScript » JavaScript While Loop » Question

JavaScript While Loop

  1. What will be the step of the interpreter in a jump statement when an exception is thrown?
    1. The interpreter throws an error
    2. The interpreter jumps to the nearest enclosing exception handler
    3. The interpreter stops its work
    4. The interpreter throws another exception
    5. None of these
Correct Option: B

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.



Your comments will be displayed only after manual approval.