Q
What is the purpose of using comments for debugging?

Answer & Solution

Answer: Option C
Solution:
Comments for debugging help isolate issues and understand code behavior during debugging.
Related Questions on Average

How can you temporarily disable a block of code in JavaScript?

A). Using single-line comments

B). Using multi-line comments

C). Both

D). None of the above

Which of the following is NOT a good practice for writing comments?

A). Updating comments as code evolves

B). Using comments for deprecated code

C). Writing comments for self-explanatory code

D). Adding excessive comments

What does the 'TODO' comment signify in code?

A). Completed task

B). Code error

C). Future task

D). Code improvement

Which keyword is used to disable a line of code in JavaScript temporarily?

A). disable

B). //

C). /* */

D). None of the above

What is the purpose of comments for conditional logic?

A). To explain code flow

B). To add conditional statements

C). To disable code temporarily

D). None of the above

Which type of comments are not executed by the JavaScript engine?

A). Single-line comments

B). Multi-line comments

C). Both

D). None of the above

How are multi-line comments denoted in JavaScript?

A). //

B). /* */

C).

D). ##

What should be avoided when writing comments in JavaScript?

A). Clarity

B). Conciseness

C). Redundancy

D). Grammar

What is the purpose of comments in JavaScript?

A). Documenting code

B). Adding debugging statements

C). Explaining code logic

D). All of the above

Which type of comment is used in HTML files to include JavaScript code?

A). Single-line comments

B). Multi-line comments

C). HTML comments

D). JavaScript comments