PRIMER 22.1

Introduction

Introduction

JavaScript is a freely available scripting language that is normally found performing the "work" behind interactive web pages, however its syntax and structure also make it an excellent tool for providing an externally programmable interface to programmes in general.

Within PRIMER it is implemented as an Application Programming Interface (API) which provides a range of functions that allow you to extract data from and poke it into the database, open windows, generate plots, and so on. This is documented in the JavaScript API Reference Manual

Anyone familiar with C or shell script programming will find existing JavaScripts are instantly readable, and can be given minor edits without further ado. For those who are more ambitious a good guide to the language is " JavaScript, A definitive Guide " by David Flanagan, published by O'Reilly. A brief tutorial on their use is given in   A Brief Tutorial on JavaScript in PRIMER .

In PRIMER 17.0 and earlier the implementation supported ECMAScript 5 features of JavaScript. In PRIMER 18.0 the implementation has been upgraded to support ECMAScript 6 (and newer) features of JavaScript.