Q
How are multi-line comments denoted in JavaScript?

Answer & Solution

Answer: Option B
Solution:
Multi-line comments in JavaScript are denoted by '/* */'.
Related Questions on Average

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

What should be avoided when writing comments in JavaScript?

A). Clarity

B). Conciseness

C). Redundancy

D). Grammar

Which type of comment is suitable for longer explanations or notes?

A). Single-line comments

B). Multi-line comments

C). Both

D). None of the above

Which type of comment is commonly used for TODO notes or future enhancements?

A). Single-line comments

B). Multi-line comments

C). Both

D). None 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

What is the purpose of comments in JavaScript?

A). Documenting code

B). Adding debugging statements

C). Explaining code logic

D). All of the above

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 symbol is used for single-line comments in JavaScript?

A). //

B). /* */

C).

D). ##

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

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

A). disable

B). //

C). /* */

D). None of the above