Search DaTutorials:  
HOME
JavaScript Tutorials
Basics
AJAX
Audio
Background Effects
Buttons
Calendars, Date and Time
Controlling Browsers
Cookies
Detection
E-Mail Related
Equivalents
Forms
Frames
Functions, Objects and Variables
Games
General Development
Generators
Hyperlinks and Buttons
Image Integration
Math and Calculators
Menus and Layout
Messages
Miscellaneous Scripts
Navigation
Randomizing & Rotation
Redirection Scripts
Scrolls
Searching
Security
Text and Element Adding
Text and Image Effects
User Info and Stats
Search For a Tutorial
JavaScript Reference


Chapter 4   Chapter 4 Comments


This chapter describes the syntax for comments, which can appear anywhere between tokens.



comment



Notations by the author to explain what a script does. Comments are ignored by the interpreter.

Implemented in  

JavaScript 1.0, NES 2.0  

ECMA version  

ECMA-262  


Syntax
// comment text
/* multiple line comment text */


Description
JavaScript supports Java-style comments:

  • Comments on a single line are preceded by a double-slash (//).

  • Comments that span multiple lines are preceded by a /* and followed by a */.

Examples
// This is a single-line comment.
/* This is a multiple-line comment. It can be of any length, and
you can put whatever you want here. */


Copyright © 2000 Netscape Communications Corp. All rights reserved.

     Satellite TV | Webbdesign | The eBay Song | Personal Loans | Earth 4 Energy
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp