This is a JavaScript course for the Swiftener JS Playground. You type in that tab, press Ctrl+Enter (or Cmd+Enter), and read the console. Python belongs in Introduction to Python. TypeScript belongs in Introduction to TypeScript. HTML pages belong in Introduction to HTML and CSS. Charts belong in Learn Chart.js, Learn Plotly.js, Learn D3, Learn Vega-Lite, Learn Apache ECharts, Learn Observable Plot, Learn ApexCharts, or Learn p5.js.
Goal
Finish every chapter by running the copy-paste blocks. The last chapter is kiosk totals you can reuse.
How to take the course
- Keep this tutorial tab and the JS Playground side by side.
- Copy an exercise, paste it as the whole editor, then press Ctrl+Enter.
- Always
console.loga result. A bare value at the end is not shown.
What this playground can and cannot do
- Can: modern JavaScript,
console.log,console.table, a tiny DOM preview, local drafts. - Cannot: Node.js
require, installing npm packages, or relying on a network fetch for these lessons. - Do not paste TypeScript type annotations here — that is the TypeScript course.
Sample files
sales.json— Nairobi kiosk rows