CFScript can be used to set variables, loop through collections, and work with the many ColdFusion functions and expressions. One will often find that CFScript enables the author to write much clearer logic, as well as more succinct code in specific instances. Although we cannot show every instance in which CFScript should be used instead of CFML, we will provide some rules of thumb. The most important rule of thumb is to use the syntax with which you are most productive. All other considerations come after that!
For more information about ECMA Script, go to www.ecma.ch/.