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. 
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz