- A) $This is a comment$
- B) //This is a comment
- C) #This is a comment#
- D) None of above
Answer: B) //This is a comment.
Explanation: In JavaScript, comments are denoted by //. This indicates that the text following the // is a comment and will not be executed by the browser. Comments are useful for providing explanations.
Example:
<script>
console.log("Hello World!"); // output - Hello World
</script>
Comments (0)