0 votes
in JavaScript by
Consider the following piece of JavaScript code:

<script>  

  

function fun(0){  

    if(0===undefined)  

        debugger;  

      

}  

  

</script>  

What is the role of the "debugger" statement?

a) It is kind of keyword which is used to debug the entire program at once

b) It will do nothing, although it is a breakpoint

c) It will debug the error in that statement

d) All above mentioned

1 Answer

0 votes
by

Answer: B

Reason: A program can contain a number of mistakes like syntax errors, logical errors, etc, and for many of them, there are no alert messages and also no indications to find the mistakes. So, to find the location of the error and to correct that, developer setups the breaking points at the doubted code using the debugger window.

...