NIELIT O Level Exam

How do you write a comment in JavaScript?

How do you write a comment in JavaScript?

जावास्क्रिप्ट में कमेंट कैसे लिखेंगे

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 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad