Description #
avaScript is a lightweight, interpreted programming language that enables dynamic content, interactivity, and logic in websites and web applications. It runs directly in the browser and is one of the core technologies of the modern web, alongside HTML and CSS.
History #
JavaScript was created in 1995 by Brendan Eich while working at Netscape. It was initially developed in just 10 days and released as Mocha, later renamed to LiveScript, and finally JavaScript to capitalize on the popularity of Java at the time (despite being unrelated).
JavaScript quickly became the standard for client-side scripting in browsers. Over time, with the introduction of ECMAScript (standardized in 1997), JavaScript has grown into a full-fledged programming language that now also powers servers (via Node.js) and native apps.
Hello World Code #
console.log("Hello, World!");
How to Run #
In the Browser Console: #
- Open any website
- Press
F12
or right-click → Inspect → Console tab - Paste and run:
console.log("Hello, World!");
In an HTML Page:
<!DOCTYPE html>
<html>
<body>
<script>
console.log("Hello, World!");
</script>
</body>
</html>
Key Concepts #
console.log()
– prints messages to the console
JavaScript runs in the browser
Dynamically typed – no explicit type declarations
Case-sensitive – console
≠ Console
Statements end with semicolons (optional but recommended)
Works inside <script>
tags
Can manipulate the DOM (Document Object Model)
Interpreted line by line
Core of frontend development
Can also run server-side with Node.js
Try It Online #
🔗 PlayCode – JavaScript Playground
🔗 JSFiddle
🔗 CodePen
Fun Facts #
JavaScript was created in just 10 days
It was once jokingly called “the world’s most misunderstood language”
Node.js made JavaScript a server-side language too
JavaScript and Java are completely different languages
Almost every modern website uses JavaScript