Debugging and Error Handling in JS

Trace issues exceptions and logs.

1. Which error is thrown when a variable is used before it is declared?
2. Which of the following are built-in error types in JavaScript?
3. The 'debugger' statement in JavaScript pauses execution and allows inspection in the browser's developer tools.
4. What keyword is used to manually throw an error in JavaScript?
5. In a try/catch statement, which block executes when no error occurs in the try block?
6. Which console methods can be used for debugging purposes?
7. A SyntaxError occurs when there is a mistake in the program's logic but the syntax is correct.
8. What property of an Error object contains a description of the error?
9. Which error type is thrown when a value is not of the expected type?
10. How can errors in Promise-based code be handled?
11. The 'catch' block in a try/catch statement can omit the error parameter.
12. What is the name of the statement that enables stricter parsing and error checking in JavaScript?
13. Which method is used to handle uncaught exceptions globally in browsers?
14. Which of the following are true about custom errors in JavaScript?
15. The stack property of an Error object provides the call stack leading to the error.
16. What keyword is used to declare a block that must execute after try/catch, whether an error occurred or not?
17. Which error occurs when a number is outside the allowable range?
18. What are common debugging techniques in JavaScript?
19. Async functions require wrapping await calls in try/catch to handle Promise rejections.
20. What is the name of the error thrown when decoding a URI fails?
Answered 0 of 0 — 0 correct