Crockford on JavaScript - Level 7: ECMAScript 5: The New Parts
Why Stack Overflow recommends it
Stack Overflow users link it as a source for what ES5 added and for Crockford's views on specific features like Object.getPrototypeOf, strict mode and array iterators.
Recommended by 1 people across 1 different months, 2012 to 2015.
What it is
Level 7 of Douglas Crockford's JavaScript lecture series, recorded at Yahoo!, walks through what the 5th edition of ECMAScript added to the language. It covers strict mode, the new Object methods such as getPrototypeOf and getOwnPropertyNames, and the array iteration methods, with Crockford's own opinions on each.
What people said
Recommends Grzegorz Kapusta · 2014-06 · Stack Overflow · on “What are the advantages of ES5 over ES3?”
There's a very good presentation by Doug Crockford on "Ecmascript 5, The New Parts": watch it on youtube [this video]
Cites Šime Vidas · 2012-01 · Stack Overflow · on “Is object empty?”
@CMS `getOwnPropertyNames` is recommended against by Crockford [this video] . According to him, this method was introduced to the language specifically for Caja (and other secure frameworks, I guess). So, there is a chance that this method is not or will not be available in certain environments.
Cites Šime Vidas · 2012-01 · Stack Overflow · on “Javascript 'undefined' when using a function variable on an array of objects”
@PointedEars My second example uses `join()` instead of `+=` string concatenation. The array iteration methods are not implemented in IE8, but you can easily shim that browser. As for efficiency, it's true that `for` is slightly faster than the array methods, but that doesn't mean it's preferred [this video] .
Cites Nathan Wall · 2012-09 · Stack Overflow · on “Don't use getPrototypeOf?”
In this video [this video] (approx. 31 minutes in), Crockford says they (speaking on behalf of the ECMAScript committee) recommend not using Object.getPrototypeOf . His explanation was that it wasn't really meant for the average developer but was meant for things like Caja, which may remove it from Object to prevent you from accessing it. Crockford can sometimes be pretty opinionated in his views on how JS should be used (can't we all?), so I'm wondering if this is really the full recommendation of the ES committee or if it's just one of Crockford's personal opinions. Has anyone read any official statement warning against using Object.getPrototypeOf ? It really sounds like a bummer to me :(, but
Cites mark · 2012-10 · Stack Overflow · on “Can IntelliJ run a client javascript code in internet explorer?”
IntelliJ supports out of the box client side javascript debugging, when the code runs on either Chrome or Firefox. Unfortunately, the wish of Douglas Crockford as expressed at 49:34 in [this video] is likely to remain unanswered and IE9 is here to stay. So, can IntelliJ be configured to run the client JS code on IE9 and be able to debug it? Thanks.
Cites Arūnas Smaliukas · 2015-01 · Stack Overflow · on “Was Douglas Crockford wrong with Strict Mode Example?”
I'm sure he wasn't. I just don't understand one example from his presentation [this video] function in_strict_mode() { return (function () { return !this; }()); } Isn't it the same like this one? function in_strict_mode() { return !this; } If is_strict_mode() would me method then I agree because this then would point to object containing method, for example my_object.in_strict_mode = function() { return (function () { return !this; }()); } But why he did it in his example (which is simple function, not a method of an object)?