MCQ Answer

How do you write a comment in JavaScript?

How do you write a comment in JavaScript?

जावास्क्रिप्ट में कमेंट कैसे लिखेंगे
Topic : JS Basic Syntax and Data Types

A. //This is a comment

B. <!--This is a comment-->

C. /* This is a comment */ /*This is a comment*/

D. Both A and C




Correct Answer is :

D. Both A and C



Explanation


In JavaScript, you can write comments using two different syntaxes:

  • Single-line comments : // use for single line comment
  • Multi-line comments: Use /* to begin a multi-line comment, and */ to end it. 
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad