Core JavaScript Reference 1.5
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.
// 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 */.
// 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.
Last Updated September 28, 2000