Question
What is JavaScript?
Answer
JavaScript is a lightweight, interpreted, object-oriented scripting language primarily used to make web pages interactive. It runs in the browser (client-side) and also on servers via Node.js (server-side).
Key characteristics:
- Interpreted – code is executed line by line at runtime
- Dynamically typed – variable types are determined at runtime
- Single-threaded – executes one task at a time using an event loop
- Multi-paradigm – supports OOP, functional, and procedural styles
// Hello World in JavaScript
console.log("Hello, World!");
Key Points
- Created by Brendan Eich in 1995
- Standardized as ECMAScript (ES)
- Runs in every modern browser natively
- Not related to Java despite the name