Posts by Douglas Crockford

Strict Mode Is Coming To Town

December 14, 2010

This is the time and season when people all over the world forget their differences and come together in peace and fellowship to celebrate the first anniversary of the ECMA General Assembly’s approval of The ECMAScript Programming Language Standard,...

Read more →

Global Domination, Part Two

April 16, 2008

As I continue the practice of the craft of programming, I am always examining my practices. Can I improve the patterns that I use so that I can make my programs clearer, stronger, better? This is particularly important when working with a language...

Read more →

I Object

May 10, 2007

One of the two really clever ideas in JavaScript is that objects are dynamic collections with differential inheritance. Differential inheritance means that when object B inherits from object A, object B does not have to contain a copy of all of...

Read more →

I'd Rather switch Than Fight!

April 25, 2007

JavaScript's switch statement was inspired by Java's switch statement, which was inspired by C++'s switch statement, which was inspired by C's switch statement, which combined aspects of C. A. R. Hoare's case statement and Fortran's computed goto...

Read more →

JavaScript, We Hardly new Ya

November 13, 2006

JavaScript is a prototypal language, but it has a new operator that tries to make it look sort of like a classical language. That tends to confuse programmers, leading to some problematic programming patterns. You never need to use new Object() in...

Read more →

for in Intrigue

September 26, 2006

One of JavaScript's best features is the ability to augment the built-in types. If we want to add a new method to a type, we simply assign a function to the type's prototype . So, if I think that JavaScript strings should have a trim method (and...

Read more →

Global Domination

June 1, 2006

JavaScript, as realized in browsers, is a load-and-go programming language. Programs are delivered to the execution site as text. This is a good fit for the web, which is at its root a text delivery system. The program text is eval 'd, which...

Read more →

Synchronous v. Asynchronous

April 4, 2006

XMLHttpRequest can operate synchronously or asynchronously. Many people prefer to use it synchronously. When used this way, the JavaScript engine is blocked until the interaction with the server is complete. Because it blocks, the flow of control...

Read more →

Minification v Obfuscation

March 6, 2006

JavaScript is a load-and-go language. Programs are delivered to the execution site as text (not as executable or semi-compiled class files) where it is compiled and executed. JavaScript works well with the Web, which is a text delivery system,...

Read more →