ECMAScript Experiments



Here are some experiments with ECMAScript (aka JavaScript or JScript) to accompany my article in the March 2000 Sky & Telescope magazine. See also the errata page for that article. More experiments will be added over time.

Keith Burnett wrote a Moon circumstances calculator after reading my S&T 2000 article.

Peter Girard has suggested the creation of an ECMAScript code library for astronomical algorithms.

An idea I've had is to write a BASIC (which dialect: GWBASIC, QBasic, etc?) to ECMAScript translator, written in ECMAScript or Java. One could paste BASIC code into a text area on a web page, and have ECMAScript and HTML code generated on the fly. This would make the BASIC code on Sky & Telescope's web site available as interactive programs. Or, it could generate a listing, making Peter Girard's idea of a code library easier to achieve.

Here are some general JavaScript, JScript, and ECMAScript links.