DEV Community

Cover image for The Stack Unpacked Episode 2: JavaScript - The Language That Runs the Web
Shaquille Niekerk
Shaquille Niekerk

Posted on

The Stack Unpacked Episode 2: JavaScript - The Language That Runs the Web

Welcome back to The Stack Unpacked. Do you sometimes find yourself spending more time debugging JavaScript state issues than managing your own life state? Then just know you’re not alone and you’re in the right place.

First let’s wind the clock back to the mid 90s, for a quick history lesson. The web was young, browsers were clunky, and most websites were basically static pages. If you wanted interactivity, you had three bad options: slow Java applets, slower server round trips, or plain old HTML with a “mailto” link. Not exactly revolutionary.

Enter Netscape. They pulled in Brendan Eich and gave him a wild assignment: “Create a scripting language for the web. You’ve got ten days.” Ten days! That’s barely enough time for me to create a landing page, let alone design a language. But somehow, he pulled it off. What he built was lightweight, approachable, and just powerful enough to make web pages feel alive.

It bounced through a few names. Mocha, LiveScript, and finally JavaScript (thanks to marketing hype). If you missed the naming saga, check out the previous episode.

The key thing: JavaScript was never meant to carry today’s weight. It was duct tape for static pages. Nobody at Netscape imagined we’d be building banking apps and streaming platforms with it.

And honestly, that’s why my own struggles with JS always make me laugh. Half the time I’ll update some piece of state and the UI just… refuses to budge. Hours later, I discover it was one stubborn useEffect all along. JavaScript: the scrappy ten day experiment that still finds ways to humble us.

The takeaway? JavaScript stuck not because it was perfect but because it was there, it worked, and people never stopped leaning on it.

Language Fundamentals & Unique Design

So what makes JavaScript itself unique? It’s a mix of brilliance and chaos.

  • Dynamic typing. Variables don’t lock into one type. A number can turn into a string mid flight. Great for experimentation, but also why 2 + 2 = 4 and "2" + 2 = "22". Freedom and chaos in equal measure.

  • Prototypal inheritance. Instead of rigid class hierarchies, objects inherit directly from other objects. Flexible, but confusing if you’re expecting Java or C++.

  • First class functions. Functions are Lego bricks you can pass them around, return them, stack them endlessly. That’s what made callbacks, higher order functions, and async code possible.

  • The event loop. The beating heart of JavaScript. Instead of freezing while waiting for slow tasks, JS queues them up and keeps going. Genius, but also the reason for so many “why isn’t this in order?!” debugging moments.

Altogether, JS is like that one friend who’s fun but reckless. Amazing to hang with, but also the reason you stayed out until 3 AM on a work night. You love it, you hate it, you keep coming back.

The Ecosystem Explosion

If 90s JavaScript was a sidekick, the 2000s turned it into a superhero.

  • V8 engine (2008). Google compiled JS down to machine code, making it fast. Suddenly, “toy language” apps felt snappy.

  • Node.js. Someone asked, “What if V8 ran outside the browser?” And boom: JavaScript on the server. Front end and back end in one language. A Swiss Army knife that suddenly chopped wood, lit fires, and maybe fought bears?

  • npm registry. It exploded. Need to left pad a string? There’s a package. Want a color picker? Package. Need to install one library but accidentally pull in a hundred friends sneaking into the concert? Package.

  • Frameworks. Angular, React, and Vue are like survival gear for managing growing complexity. They gave us patterns, state management, and structure.

  • Tooling. Babel let us use shiny new features early. Webpack, Parcel, Rollup bundled our mess for the browser. And TypeScript snuck in with some much needed guardrails (we’ll dive into that next episode).

The ecosystem grew so fast it was overwhelming. Today, you can spin up a project in minutes with powerful tooling, but also feel like you need a PhD just to pick a starter template.

The Weird Bits

And now… the quirks. Because no JavaScript story is complete without them.

  • Type coercion. JS wants to be “helpful,” so it converts things on the fly. Zero equals false? Sure. Empty array equals false? Yep.

  • Hoisting. Functions can run before they’re declared, and variables sort of exist before they exist. Every new dev hits the “why does my variable exist but not exist?” moment.

  • The wandering this. In most languages, this points to the current object. In JavaScript, it’s a free spirit. Sometimes with you, sometimes global, sometimes undefined unless you wrangle it with .bind().

  • Async chaos. NonBlocking is genius, but it gave us callback hell: code nested so deep your editor begged for a second monitor. Promises and async/await cleaned it up, but async still surprises you with “undefined” returns that just haven’t resolved yet.

And the kicker? None of this is a bug. It’s all by design. Remember that ten day deadline. It’s duct tape in the wiring.

Like the time I discovered that adding an empty array to another empty array doesn’t throw an error it just returns an empty string. Why? Because JavaScript.

Where JavaScript Fits Today

So where does JS sit now?

  • Browsers. Still the backbone. HTML and CSS handle structure and style, but JS makes pages do things.

  • Servers. Node.js turned JS into a backend player. Teams could now code front and back in one language, giving rise to the “fullstack JS dev.”

  • Frameworks. Vanilla JS is the foundation, but frameworks (React, Angular, Vue) scale apps without descending into spaghetti. Each has trade offs. React gives freedom, Angular gives structure, Vue tries to balance both.

  • Beyond the web. React Native powers mobile apps. Electron builds desktop apps. JS even sneaks into IoT and cloud functions.

The key? Just because JS can run everywhere doesn’t mean it always should. Sometimes a strongly typed backend makes more sense. Sometimes plain HTML/CSS is enough. JS is versatile, not universal.

For beginners: don’t panic. Start with vanilla JS and DOM, events, async. Once you get the fundamentals, frameworks and Node won’t feel overwhelming.

The Future & Ecosystem Trends

Where’s JavaScript heading?

  • Language upgrades. Annual ECMAScript updates (optional chaining, nullish coalescing, destructuring) keep smoothing rough edges.

  • WebAssembly (WASM). Lets browsers run Rust, C, or C++ alongside JS at near native speeds. JS becomes the manager, delegating heavy lifting while keeping the glue role.

  • New runtimes. Deno and Bun are rethinking Node’s foundations with better security and blazing speed. Whether they dethrone Node is TBD, but the competition shows JS isn’t slowing down.

  • Tooling evolution. After years of Babel, Webpack, and Vite, the trend is simplification. Future tools will focus on reducing boilerplate so devs can build instead of configure.

  • TypeScript. It’s not replacing JS, it’s reinforcing it. Strong typing is becoming survival gear for scaling apps.

Big picture: JavaScript isn’t going anywhere. It’ll keep evolving, branching, and surprising us, which is very on brand for a language hacked together in ten days that somehow ended up running the internet.

Wrap Up

Today we unpacked JavaScript, the scrappy little language that was supposed to validate forms but ended up powering the modern web.

We traced it from its ten day birth at Netscape, through fundamentals like dynamic typing and the event loop, to the V8/Node/npm boom that turned it fullstack. We wrestled with quirks like coercion and this, explored where it fits today, and peeked into a future with WASM, Bun, Deno, and TypeScript.

The truth? JavaScript isn’t just the language of the web. It’s the glue, the connective tissue of modern development. Love it or hate it, it’s here to stay.

Outro

If you enjoyed this episode of The Stack Unpacked, hit follow so you don’t miss the next one where we dive into TypeScript, JavaScript’s safety net and the reason your future self will thank you.

And hey, if you’ve got a friend just starting in web dev, share this with them. Nobody deserves to face callback hell alone.

At the end of the day, JavaScript is like pizza: even when it’s messy, weird, and makes you uncomfortable… you just keep coming back for more.

And that’s where we’ll pause for today. But before I go, I’d love to hear from you.

If you’re a seasoned developer, what’s one piece of advice you wish you’d known earlier? Something that might help those of us still figuring this out. Drop it in the comments. Your experience could make someone else’s learning curve a little less steep.

Top comments (0)