What is JavaScript?

JavaScript is the programming language that powers interactive web experiences. From form validation to real-time updates to complex applications, JavaScript is the bridge between static HTML/CSS and dynamic user interaction.

Introduction

What Actually Happened

You've now learned how computers process information (binary, transistors) and how the web works (URLs, HTTP, servers). You might be wondering: where does JavaScript fit into all this?

JavaScript was created in 1995 by Brendan Eich while working at Netscape Communications Corporation. The original name was LiveScript. However, due to a marketing decision—an attempt to capitalize on the popularity of the Java programming language at the time—it was renamed to JavaScript.

This caused decades of confusion, but here's the bottom line: JavaScript and Java are completely separate languages. As one common analogy goes: Java is to JavaScript as ham is to a hammock. They share a name, but not much else.

Quick note: Technically, JavaScript is trademarked by Oracle, so the official standard is called ECMAScript. For practical purposes, we use these terms interchangeably.

What You'll Learn Today

  • What JavaScript actually is
  • How it fits into the web development picture
  • Why it's so widely used
  • The ES2015+ standard we'll be using

Core Concept Overview

JavaScript: The Third Layer

When you've built websites with HTML and CSS, you created the structure and styling. JavaScript is the third layer: it makes things interactive.

Think of it this way:

  • HTML = The skeleton (structure)
  • CSS = The skin and clothes (presentation)
  • JavaScript = The muscles and nerves (behavior and interactivity)

Higher-Order vs. Lower-Order Languages

JavaScript is a higher-order language. This means you write code using words and syntax that humans can relatively understand:

// This reads almost like English
const message = "Hello, World!";
console.log(message);

But here's what happens under the hood: When JavaScript runs, an interpreter (a program written in C++) translates your human-readable code into lower-order languages—C, Assembly—until finally it becomes the 1s and 0s that computers actually understand. All of this happens instantly.

This is why JavaScript is so accessible to beginners: you don't need to understand machine code or assembly language to get started. The language handles the translation for you.

What JavaScript Can Do

JavaScript runs in the browser on the client side (the user's computer), which makes it unique. Here's what that means:

  • Interactive forms: Validate user input in real-time, respond to clicks
  • Dynamic content: Update the page without refreshing
  • Animations and effects: Create smooth transitions and animations
  • Storage: Save data locally on the user's device
  • Real-time features: Chat, notifications, live updates

JavaScript can also run on servers (Node.js), in desktop applications (Electron), and on mobile devices (React Native). But the core strength of JavaScript is that it's the only language built directly into every web browser by default.

ECMAScript and Modern JavaScript

JavaScript as a language got a major update in June 2015 called ES2015 (also known as ES6). This update brought significant improvements in readability, features, and how developers can organize code.

Since then, the JavaScript standards committee (TC39—a group of about 50-100 developers) releases updates to the language annually. These updates include new features and refinements.

For this course: We'll focus on ES2015+ syntax—the modern way of writing JavaScript. This means you're learning the current, industry-standard version of the language, not outdated syntax from the 1990s.

Self-Check: Test Your Understanding

  1. Origin story: In your own words, explain why JavaScript is called "JavaScript" even though it's unrelated to Java.

  2. Three layers: Describe how HTML, CSS, and JavaScript work together. What would a website look like if it only had HTML and CSS, but no JavaScript?

  3. Higher-order language: What does it mean that JavaScript is a "higher-order language"? Who or what does the translation into machine code?

  4. Built-in power: Why is it significant that JavaScript is built directly into every web browser by default?

  5. ES2015: What does ES2015 represent, and why does it matter that we're learning modern JavaScript syntax?

Why This Matters

Understanding what JavaScript is—not just how to write it—helps you make better decisions as you learn. You'll understand why certain things are possible in the browser and others aren't. You'll understand why JavaScript is so widely used (despite its quirks). And you'll be equipped to learn other languages more easily later, because you'll understand the underlying concepts.


Next up: We'll look at the reality of development with AI and other tools, then move into JavaScript Basics where you'll start writing actual code.