8.How can you add a comment in a JavaScript?
-
'This is a comment
-
<!--This is a comment-->
-
//This is a comment
-
"This is a comment
C
Correct answer
Explanation
In JavaScript, single-line comments are designated using double slashes at the beginning of the comment. HTML comment tags are used in HTML files, not inside JavaScript script blocks.