What are the purposes of comments in JavaScript code?

  1. Comments can make the code easier to understand.

  2. Comments can help hide the code from browsers that cannot interpret JavaScript.

  3. Comments can help display a warning to users of old browsers that do not support JavaScript.

  4. All of above.


Correct Option: D

Find more quizzes: