Scientific Calculator & DOM Labs — Vanilla JS
A set of dependency-free HTML/CSS/JavaScript mini-projects covering the fundamentals: a CSS-Grid scientific calculator (trig, log, roots, π/e), plus DOM-manipulation and event-handling exercises (field swapping, arithmetic, BMI). No build tools — just open in a browser.
Framework-free DOM, event-handling and regex exercises built around a CSS-Grid scientific calculator
A small collection of vanilla front-end exercises focused on the fundamentals of the DOM and browser JavaScript — no frameworks, no build step.
What's inside
| File | Builds |
|---|---|
index.html + calculator.js | CSS-Grid scientific calculator |
javascripttd.html + td2js.js | DOM-manipulation tutorial exercises |
testjs.html | a simple calculator prototype |
style.css | shared styling |
Scientific calculator — trigonometric functions (sin, cos, tan), logarithms (ln, log), square root, exponentiation, the constants π and e, and percentage operations, laid out with CSS Grid.
DOM tutorial — field swapping, arithmetic operations and a BMI calculator, all wired with plain event handling; also touches regular expressions.
A clean illustration of core web fundamentals before reaching for a framework — HTML 57% / JS 37% / CSS 6%.