About the Empty Statement

An empty statement is simply a semicolon by itself as follows:

 ;

An empty statement does nothing; its purpose is to occupy the space where a sub-statement is required inside of a compound statement. For example, the following code counts the number of items in a list:

for(var n=0; list[n]!=null; n++)
  ;

All you want to do in the for loop is increment n until you get to the end of the list; however, the for statement requires an additional statement executed in each iteration. By using an empty statement in this location, you satisfy the syntax requirements of the for statement.

See About the For Statement.