Technically, there is no way to create private members in JavaScript. What Crockford suggests is actually a way of using closures (p. 65) to "capture" the locally defined variables in functions. To prove this, try creating a second object after the first, like this:
Code:
var oCar2 = new Car("blue", "2", "20mpg");
alert(oCar2.color); //undefined
alert(oCar2.doors); //undefined
alert(oCar2.mpg); //undefined
alert(oCar2.drivers); //undefined
oCar2.showColor(); //red
oCar2.showDoors(); //4
oCar2.showMpg(); //20mpg
oCar2.showDrivers();
Because the values were only captured in the closure the first time the Car() constructor was called, those variables are exactly the same as when the first instance was created.
You can use Crockford's methodology directly as it uses the constructor paradigm and so the variable captures occur correctly, you just can't mix it with dynamic prototyping.
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/