Makes websites interactive (buttons, forms, animations)
Runs in the browser (no install needed)
Used for frontend + backend (with Node.js)
Alternatives:
TypeScript → safer version of JavaScript
Python → used in backend (Django, Flask)
Java / C# → backend development
Dart (Flutter) → apps
Kotlin / Swift → mobile apps
👉 But for browsers, JavaScript is the main language (no true direct replacement).
Short answer (exam):