13.
Which of the following is the correct way to comment in JavaScript?
// This is a comment
/* This is a comment */
<!-- This is a comment -->
<!--- This is a comment --->
Correct: A, B
In JavaScript, single-line comments are created using "//" and multi-line comments are created using "/* /". A1 is the correct syntax for single-line comments where anything after "//" on the same line is ignored by the JavaScript interpreter. A2 is the correct syntax for multi-line comments where anything between "/" and "*/" is ignored. A3 and A4 are not valid comment syntax in JavaScript. A3 resembles HTML comment syntax, and A4 uses an incorrect number of hyphens.