Table of Contents

Everyone knows Brendan Eich created JavaScript in 10 days in 1995. But there’s a less-told story: in the decade after JavaScript was born, serious developers largely considered it a toy.

What changed that wasn’t an upgrade to the language itself. It was the work of one person.

TL;DR

Douglas Crockford was an architect at Yahoo! who did three things that brought JavaScript back from the dead: (1) “discovered” and formalized the JSON format in 2001, freeing web APIs from the XML nightmare; (2) created JSLint, the first tool to bring code quality standards to JavaScript; (3) published JavaScript: The Good Parts in 2008, demonstrating that beneath all the bad parts, JavaScript actually had an elegant core.

What It Is

Douglas Crockford is an engineer who started writing software in the 1980s and served as JavaScript Architect at Yahoo! in the 2000s. He didn’t create JavaScript, but he’s the person who made JavaScript taken seriously.

In the early 2000s, JavaScript had a terrible reputation. It was riddled with design flaws: the chaos of == versus ===, the unpredictable behavior of this, global namespace pollution, no module system. Many backend developers treated it as a “beginner language” to be avoided whenever possible.

Why It Matters

The Birth of JSON

In 2001, Crockford needed a way for browsers and servers to pass data to each other. The standard approach at the time was XML + SOAP, but the implementation cost and parsing complexity of that combination struck him as absurd.

He noticed that JavaScript’s object literal syntax ({key: value}) was itself a perfect data format — readable, lightweight, and natively parseable by every JavaScript environment. He registered json.org, wrote the complete specification for the format, and promoted it.

In 2006, JSON became the official IETF RFC 4627 standard.

Today, JSON is the default data format for virtually all web APIs. You use it every day — whether in RESTful APIs, configuration files, or frontend-backend communication. Crockford didn’t invent JSON’s syntax (it was just JavaScript object literals), but he formalized it and got the industry to adopt it.

JSLint: Giving JavaScript Quality Standards

In 2002, Crockford released JSLint — a static analysis tool that scans JavaScript code and flags potential errors and bad practices.

His description became famous: “JSLint will hurt your feelings.” Because it’s extremely strict — nearly any code written casually gets flagged with a pile of problems.

But that was precisely the value: before JSLint, JavaScript had no static analysis tools, no code style standards, and the entire ecosystem operated on “if it runs, it’s fine.” JSLint was the first tool to assert that JavaScript could have quality standards. Today’s ESLint is its spiritual successor.

JavaScript: The Good Parts: A Book That Changed Perception

In 2008, Crockford published a 176-page book titled JavaScript: The Good Parts.

The book’s central argument, in Crockford’s own words, was “one of the most important discoveries of the 21st century” — that JavaScript actually contained a well-designed language, but it was surrounded by large amounts of bad design decisions. If you chose to use only “the good parts” (prototypal inheritance, closures, functional features), JavaScript was an elegant language.

This was genuinely heterodox at the time. The prevailing view was “JavaScript is just a bad language all the way through.” Crockford said no — the problem is you’re using it wrong.

The book changed how an entire generation of developers saw JavaScript, and was the cultural starting point for JavaScript being taken seriously.

How It Differs from Brendan Eich’s Contribution

Brendan Eich created JavaScript — that’s unquestionable. But his contribution was largely buried under waves of negative criticism in the language’s first decade.

Crockford’s contribution came during that low point: using tools and arguments to redefine what “good JavaScript” meant, laying the cultural groundwork for the later explosion of Node.js, the V8 engine, and the npm ecosystem.

Without Crockford’s JSON specification, web APIs might still be using XML today. Without JSLint and The Good Parts, JavaScript might have waited much longer to be taken seriously by backend developers.

Bottom Line

Douglas Crockford isn’t in JavaScript’s origin story, but he’s in JavaScript’s redemption story.

There’s another layer to this story: sometimes a language or technology’s success doesn’t depend on its original design. It depends on whether someone takes the time to organize its usage patterns, establish its best practices, and say “this deserves to be taken seriously.”

References

Ask this article

Answers come from this article only. Click any prompt below or open the chat at the bottom right.

🇺🇸 English

Everyone knows Brendan Eich created JavaScript in ten days, back in 1995. That's the famous story. But here's the part nobody tells you: for about a decade after JavaScript was born, serious developers thought of it as a toy. A joke. Something you used to make text blink on a webpage, not something you built real software with.

So what changed? It wasn't an upgrade to the language. It was one person. His name is Douglas Crockford — and if you've never heard of him, that's kind of the point of this story.

Let me set the scene. Crockford was an engineer who'd been writing software since the 1980s, and in the 2000s he became the JavaScript Architect at Yahoo!. He did not create JavaScript. But he's arguably the reason anyone takes it seriously today.

And back in the early 2000s, that was a hard sell. JavaScript had a genuinely terrible reputation, and honestly, some of it was earned. The language was full of landmines. You had the confusion between double-equals and triple-equals for comparison. You had the keyword "this," which behaved in ways that could surprise even experienced programmers. Everything leaked into one giant global namespace. There was no module system at all. Backend developers looked at all that and said, "Yeah, that's a beginner's language. I'll pass."

Crockford did three things that pulled JavaScript back from the dead. Let's walk through them.

The first one is JSON — and you use it every single day, whether you realize it or not.

Rewind to 2001. Crockford needed a way for browsers and servers to send data back and forth. The standard approach at the time was XML combined with SOAP, and if you never had to work with that, count yourself lucky. It was heavy. It was verbose. Writing the code to build it and then parse it on the other end felt, to Crockford, frankly absurd for what should be a simple job.

Then he noticed something clever. JavaScript already had a way to write objects — you know, curly braces, a key, a colon, a value. That little bit of syntax was, all by itself, a perfect data format. It was human-readable. It was lightweight. And every JavaScript environment on Earth could already parse it natively, for free. So he took that idea, registered the domain json.org, wrote up a complete specification for the format, and started promoting it. By 2006, JSON had become an official internet standard — RFC 4627.

Now here's the honest nuance. Crockford didn't invent the syntax. It was just JavaScript object literals, sitting there the whole time. What he did was formalize it, name it, document it, and convince the entire industry to adopt it. And they did. Today, JSON is the default data format for basically every web API on the planet — REST APIs, config files, frontend-to-backend communication, all of it. Think about that: without Crockford, we might all still be wrestling with XML.

The second thing he did was JSLint, in 2002.

JSLint was a static analysis tool — meaning it reads through your JavaScript and flags potential errors and bad habits before you ever run the code. And Crockford described it with a line that became legendary. He said, "JSLint will hurt your feelings." And he meant it. The tool was brutally strict. You could write code that worked perfectly fine, run it through JSLint, and get back a wall of complaints.

But that harshness was the whole point. Before JSLint, JavaScript had no static analysis tools, no agreed-upon style standards — the entire ecosystem basically ran on the philosophy of "eh, if it runs, ship it." JSLint was the first tool to plant a flag and say: no, JavaScript can have quality standards. If you've ever used ESLint — and if you write JavaScript today, you have — that's the direct descendant of Crockford's idea.

And the third thing, in 2008, was a book. A slim one — 176 pages — called *JavaScript: The Good Parts*.

The central argument of that book was, in Crockford's own slightly grandiose words, "one of the most important discoveries of the 21st century." His claim was this: buried inside JavaScript, underneath all the bad design decisions, there was actually a beautiful, well-designed language trying to get out. If you deliberately restricted yourself to only the good parts — things like prototypal inheritance, closures, its functional programming features — JavaScript was genuinely elegant.

And you have to understand how heretical that was at the time. The mainstream opinion was simple: JavaScript is a bad language, top to bottom, end of story. Crockford stood up and said, no — the language isn't the problem. You're using it wrong. That book reframed how an entire generation of developers saw JavaScript. It was, culturally, the moment the tide started to turn.

So let's put this in perspective against Brendan Eich. Eich created JavaScript — that's not in dispute, and it's a remarkable feat for ten days of work. But his contribution got buried under a decade of criticism. Crockford's contribution came at exactly that low point. He used tools and arguments to redefine what "good JavaScript" even meant, and in doing so he laid the cultural foundation for everything that came later — Node.js, the V8 engine, the entire npm ecosystem. That explosion needed the ground to be prepared first, and Crockford is the one who prepared it.

So here are the takeaways I want you to walk away with.

First: the technologies you use every day often have a hidden second author — not the person who invented them, but the person who made them usable and respectable. For JavaScript, that person is Douglas Crockford.

Second: JSON, JSLint, and *The Good Parts* weren't upgrades to the language. They were an act of curation — pulling out the good, quarantining the bad, and writing it all down. Sometimes clarity is the innovation.

And third, the bigger lesson: a technology's success often has very little to do with its original design. It depends on whether someone takes the time to organize how it's used, establish the best practices, and stand up to say, "This actually deserves to be taken seriously." Crockford isn't in JavaScript's origin story. He's in its redemption story. And honestly, those are sometimes the stories that matter more.

🇹🇼 中文

2009 年,JavaScript 幾乎是所有工程師心照不宣討厭的一種語言。

它是 Brendan Eich 在十天內設計出來的——這件事本身就成了業界笑話,很多人用著用著都會忍不住懷疑:他第二天之後到底在幹嘛?更麻煩的是,那個年代每個瀏覽器對它的解讀都不一樣,沒有標準函式庫、沒有模組、也沒有類別。如果你的主要工作就是寫 JavaScript,你甚至會被當成上不了檯面的「script kiddie」。

可是接下來的十年,情況徹底翻轉。JavaScript 從一個沒人想直接碰的語言,變成世界上數一數二熱門的程式語言;寫 JavaScript 的人,也從被看不起的角色,變成被認真對待的工程師。

這場翻身有很多推手,而其中一個被嚴重低估、甚至幾乎被時間遺忘的名字,是同一個人——Jeremy Ashkenas。

先講他的處境。2009 年,Ashkenas 在 DocumentCloud 工作,負責一個大量依賴前端 JavaScript 的應用程式——在當時,這種「重前端」的專案其實還很罕見。而他的背景是 Ruby,卻被逼著每天寫 JavaScript。多數人碰到這種情況,會選擇忍耐,得一種「JavaScript 斯德哥爾摩症候群」。但 Ashkenas 不一樣,他是真心相信自己能把這語言修好,然後也真的動手了。

他要解決的第一個問題,是 JavaScript 根本沒有標準函式庫。這件事在當年很關鍵:那時 Firefox 已經支援了一些陣列的輔助方法,像是 map、reduce、forEach,但 Internet Explorer 還沒有。也就是說,除非你自己寫 polyfill,否則你根本不能放心用這些方法。

為了解決它,Ashkenas 發布了 Underscore.js。你可以把它想成一條「工具腰帶」,裡面收了大約六十個輔助函式,讓處理陣列跟物件變得輕鬆很多。以今天的眼光看,這聽起來一點都不刺激;但在那個寫網頁極度痛苦的年代,Underscore 實實在在幫了很多人。而它後來紅到一個程度,很多功能被直接吸收進 JavaScript 語言本身——結果反而讓 Underscore 自己變得多餘。這其實是開源工具最好的結局之一。

但 Underscore 只是他的第一發。接下來他的想法更大膽:與其用一個新函式庫去修修補補,不如直接做一個全新的語言,給自己更大的自由。於是有了 CoffeeScript——一個會被編譯成 JavaScript 的語言。

要理解他為什麼這麼做,得先記得 2009 年的 JavaScript 有多原始。那時候沒有 class,你想做繼承,得靠一種手動模式,把屬性掛到一個叫 prototype 的隱藏物件上;變數宣告的作用域規則很詭異,宣告會被自動 hoist 到函式頂端,不管你有沒有意識到;相等運算子跟嚴格相等運算子的差別,幾乎沒人真的搞懂或在意,於是到處都在發生你沒察覺的型別自動轉換;甚至連定義一個簡單函式,都得每次乖乖打出 function 這個字,程式碼又臭又長。

而 CoffeeScript 的聰明之處,就在「編譯成 JavaScript」這個做法。它的流程很單純:你寫 CoffeeScript,交給編譯器,產出乾淨的 JavaScript,再丟給瀏覽器執行。這樣一來,Ashkenas 就繞過了整條漫長的路徑——他不用等標準委員會開會,也不用等各家瀏覽器廠商跟上,就能自己動手把語言修好。更妙的是,他可以把 JavaScript 那些爛掉的部分,直接留在 Brendan Eich 當年那十天的房間裡,不帶出來。

這套思路的核心,是「不跟現況正面對抗,而是在它之上疊一層」——你保留 JavaScript 的執行環境跟相容性,只換掉開發者實際要動手寫的那一層語法。

而且有一段時間,CoffeeScript 是真的無所不在。Rails 之父 DHH 幾乎一夜之間就採用了它。2011 年,CoffeeScript 作為預設的 JavaScript 預處理器,跟著 Rails 3.1 一起出貨——這代表當時全世界每一個新建立的 Rails 專案,前端預設就是用 CoffeeScript 寫的。GitHub、Dropbox,還有一長串 2010 年代初期的新創公司,也都用了它。有那麼幾年,它幾乎就是預設選項。

好,收個尾。這裡有三個我想留給你的重點。

第一,JavaScript 的翻身,從來不是靠某一次官方的語言升級一步到位,而是一群人在最低谷的時候,用工具、用新語言,一點一點累積出來的。

第二,Underscore.js 的價值不只在當下好用,更在於它把好用的模式一路推進到語言本身,最後功成身退——這是開源最漂亮的一種結局。

第三,也是 CoffeeScript 真正示範的事:當現有工具爛到不行時,你不一定要坐等別人來修,你可以自己在它之上疊一層,先把日子過好。

Jeremy Ashkenas 不在 JavaScript 的起源故事裡,但他確確實實,在它的救贖故事裡。

Tags

Related Articles