Developing Courseware for Mathematics and Computer Science in JavaScript

David B. Sher

Javascript is a powerful language for developing educational software. Its advantages are:
Runs on any platform with a sufficient web browser (netscape 3 or microsoft 4)
Javascript is an interpreted language yielding these advantages:
It is compact so it loads quickly.
Requires no additional software for compilation.
Runs on client, so no additional load on server.
Object oriented language eases design of web pages.
Javascript objects easily interacts with html code.
Similarity to C and C++ allows interpretation of simple C and C++ code for teaching computer science.

The major disadvantage is that javascript is limited in its graphics capabilities. However sophisticated graphics can be designed in javascript. For example I have designed a graphing calculator in javascript for teaching mathematics. This tool can perform any calculation, graph most common functions. The textual features such as building tables for functions are very efficient. However building a graph requires loading individual images for each pixel of the graph which can require excessive memory and time. However the other advantages compensate for these weaknesses. Another important tool that uses these javascript graphics and calculation techniques is a mathematical modeling tool which we use to teach students about linear, exponential and quadratic models of preloaded datasets.

We have developed interactive javascripts to teach HTML. [Click here to see html talk] The web page simply reflects the html the student developed back into another window. Soon we will develop similar software for teaching C++ in our classes.

Hence javascript is a language which allows development of fast and effective interactive web pages for mathematics and computer science instruction.