One final legal statement in JavaScript is the empty statement. It
looks like this:
Executing the empty statement obviously has no effect and
performs no action. You might think that there would be little
reason to ever use such a statement, but it turns out that the
empty statement is occasionally useful when you want to create a
loop that has an empty body. For example:
// initialize an array a
for(i=0; i < a.length; a[i++] =index.html 0) ;
To make your code clear, it can be useful to comment your empty
statements as such:
for(i=0; i < a.length; a[i++] =index.html 0) /* empty */ ;
©2025 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?<A HREF="http://techref.massmind.org/Techref/language/JAVA/SCRIPT/definitive/ch05_13.htm"> [Chapter 5] 5.13 The Empty Statement</A>
.