2.3 JavaScript Language Basics

JavaScript syntax is very similar to that of C++ and Java. It uses the same construct for all loops and has similar syntax for operators. The following is a typical script:

var total = 0;

 

for(var i = 1; i < Table1.table.length; i++) {

   total += parseInt(Table1.table[i][1]);

}

 

text = (total / Table1.table.length).toFixed(2);

This section covers the basics of programming with JavaScript.

<< 2.2 Object-Oriented Concepts © 1996-2013 InetSoft Technology Corporation (v11.5) Comments and Names >>