A structured JavaScript primer of around 27 short, worked examples that build up the core of the language one concept at a time. Intended as a self-contained, example-driven introduction for readers coming to JavaScript for scientific or web programming.
- Output (`document.write`), alerts, prompts and confirms
- Variables, operators and logical operators
- Conditional statements and `switch`
- Loops
- Functions, function expressions and `return`
- Recursion
- Code style and conventions
HTML and JavaScript (with a few external `.js` files).
Open any `JS_*.html` file in a web browser and use the developer console to follow along. The examples run client-side with no dependencies.
Polina Lemenkova
ORCID: https://orcid.org/0000-0002-5759-1089
Released under the MIT License (see LICENSE).
These materials were written as programming exercises and are shared as open, self-contained teaching examples. If they are useful in your own teaching or research, a link back to this repository and to the author's ORCID is appreciated.