Javascript or Jquery Comments



Commenting code is a good programming practice and every good programmer comments the code.

In Javascript or Jquery, you comment the code between /* and */. This allows the user to create multiple line comments.

For a single line comment, you comment using double backslash (//).

Example: Javascript/Jquery Comments

<language="javaScript" type="text/javaScript">
 // This is a single line comment.
 
 /*
This is a multiple line javascript comment.
this is a multiple line javascript comment.
this is a multiple line javascript comment.
 */
 document.write("Hello World.")
 
</script>
<javascript>