ExamVeda
Login
Home
This question belongs to Javascript Basic And Variables
Basic and Variables
?

Consider the following code snippet

function f(o) 
{
     if (o === undefined) debugger;
}
What could be the task of the statement debugger?

Answer & Solution
Correct Answer: Option A
The debugger statement normally does nothing. If, however, a debugger program is available and is running, then an implementation may (but is not required to) perform some kind of debugging action. In practice, this statement acts like a breakpoint: execution of JavaScript code stops and you can use the debugger to print variable’s values.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.