How to comment javascript code?

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.*/









Related Tutorials/Questions & Answers:
How to comment javascript code?
JavaScript Comment Tag
Advertisements
javascript comment syntax html
ModuleNotFoundError: No module named 'codel'
JavaScript Comment
ModuleNotFoundError: No module named 'codep'
ModuleNotFoundError: No module named 'codep'
ModuleNotFoundError: No module named 'codep'
ModuleNotFoundError: No module named 'codev'
ModuleNotFoundError: No module named 'codex'
ModuleNotFoundError: No module named 'codex'
ModuleNotFoundError: No module named 'codeq-nlp-api'
ModuleNotFoundError: No module named 'codev-dashboard'
ModuleNotFoundError: No module named 'codev-dashboard'
ModuleNotFoundError: No module named 'codex-africanus'
ModuleNotFoundError: No module named 'codex-africanus'
ModuleNotFoundError: No module named 'codet-ari'
ModuleNotFoundError: No module named 'codet-ari'
ModuleNotFoundError: No module named 'codet-ari'
ModuleNotFoundError: No module named 'codet-ari'
ModuleNotFoundError: No module named 'codet-swaggerpy'
ModuleNotFoundError: No module named 'coder'
ModuleNotFoundError: No module named 'coder'
java code7 of 1
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
ModuleNotFoundError: No module named 'coded_exceptions'
ModuleNotFoundError: No module named 'coded_exceptions'
ModuleNotFoundError: No module named 'bdd-coder'
ModuleNotFoundError: No module named 'live-coder'
ModuleNotFoundError: No module named 'range-coder'
ModuleNotFoundError: No module named 'bdd-coder'
Coder for Pattern
COMMENT & HIDDEN COMMENT IN JSP
ModuleNotFoundError: No module named 'cw_msgpack_coder'
Version of com.intersult>coder dependency
How to create arrays in JavaScript?
JavaScript createComment method
Maven dependency for com.intersult - coder version 1.5 is released. Learn to use coder version 1.5 in Maven based Java projects
How do i do the coding for 'leaving a comment' in java
Media Coder
how to show popup in javascript
How to execute shellscript in Javascript
how to put php in javascript
Maven Repository/Dependency: com.intersult | coder
How to shift and unshift using JavaScript?
How to encrypt JavaScript?
show codes of this
ModuleNotFoundError: No module named 'codes'
ModuleNotFoundError: No module named 'codes'

Ads