
Apu
February 12, 2023 ›
#Javascript
›
#Q&A
❌
Which of the following is the correct statement for comment in a JavaScript?
- 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>
save
listen
AI Answer
Which of the following is the correct statement for comment in a JavaScript?
0
A) $This is a comment$ B) //This is a comment C) #This is a comment# D) None of above Answer:…
asked
Apu
0 answers
2915
A) $This is a comment$ B) //This is a comment C) #This is a comment# D) None of above Answer:…
Answer Link
answered
Apu