Javascript or Jquery Comments

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


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>





Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.