7.
Which of the following statements about comments in JavaScript is true?
Comments are executed by the JavaScript interpreter.
Comments are ignored by the JavaScript interpreter.
Comments are used to store data in a JavaScript program.
Comments are mandatory for every JavaScript program.
Correct: B
Comments in JavaScript are ignored by the JavaScript interpreter. They are not executed as part of the code and do not affect the program's functionality. Comments are solely for documentation and explanatory purposes and have no impact on the execution or behavior of the code. While comments are highly recommended to improve code readability and maintainability, they are not mandatory for every JavaScript program.