How to comment javascript code?

Ads
 

How to comment javascript code?

How to comment javascript code?

View Answers

November 10, 2010 at 11:43 AM

Comments can be added to explain the JavaScript, or to make the code more readable. With comments, you can add extra information pertaining to your code. Comments are ignored (i.e., are not processed as coding instructions) by the computer.

  1. Single-line comments- Single-line comments start anywhere in the line and continue to the end of the line. Single-line comments begin with a double forward slash (//),

For example-

// Description: This JavaScript code prints a simple message.
  1. Multiline comments- Multiline comments span multiple lines. Multiline comments start with slash-asterisk (/*) and end with asterisk-slash (*/) pair. For example,

    /* Author: Scripting Master Description: This JavaScript code prints a simple message.*/

Ads









Related Tutorials/Questions & Answers:
How to comment javascript code?
JavaScript Comment Tag
Advertisements
javascript comment syntax html
JavaScript Comment
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
COMMENT & HIDDEN COMMENT IN JSP
How do i do the coding for 'leaving a comment' in java
java code7 of 1
Coder for Pattern
How to create arrays in JavaScript?
Version of com.intersult>coder dependency
JSP Comment and HTML Comment
how to show popup in javascript
Version of commons-codec>commons-codec dependency
Media Coder
How to execute shellscript in Javascript
JavaScript createComment method
how to put php in javascript
Use of Comment Function in PHP
Comment PHP Script - MobileApplications
Hidden Comment
Excel Cell Comment
How to shift and unshift using JavaScript?
Difference between documentation comment and multiline comment in java?
JSP Comment Types with example
Version of com.lambdaworks>codec dependency
How to encrypt JavaScript?
Maven Dependency coder >> 1.3
Artifacts of commons-codec
show codes of this

Ads