please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 2
Lexical Structure
Next
 

2.4 Comments

JavaScript supports both C-style and C++-style comments. Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript. Also, any text (which may cover multiple lines) between the characters /* and */ is treated as a comment.

In addition, JavaScript recognizes the HTML comment opening sequence <!--. JavaScript treats this as a single-line comment, just as it does the // comment, and does not recognize the HTML comment closing sequence -->. There is a special purpose for recognizing the HTML comment but treating it differently from HTML. In a JavaScript program, if the first line begins <!--, and the last line ends //-->, then the entire program is contained within an HTML comment and will be ignored (instead of formatted and displayed) by browsers that do not support JavaScript. Since the first line begins with <!-- and the last line begins with //, JavaScript ignores both, but does not ignore the lines in between. In this way, it is possible to hide code from web browsers that can't understand it, without hiding it from those that can. Because of the special purpose of the <!-- comment, you should use it only in the first line of your scripts; other uses would be confusing.


Previous Home Next
Optional Semicolons Book Index Literals

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/java/SCRIPT/definitive/ch02_04.htm, 4KB, , updated: 2019/10/14 15:00, local time: 2024/12/2 04:06,
TOP NEW HELP FIND: 
3.147.53.90:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/language/java/SCRIPT/definitive/ch02_04.htm"> [Chapter 2] 2.4 Comments</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .