JS: Douglas Crockford the Better Parts: the Bads Parts Reconsidered

By Xah Lee. Date: . Last updated: .
Douglas Crockford on JavaScript using this 2015-02-05
Douglas Crockford on using JavaScript this. [source https://plus.google.com/+DouglasCrockfordEsq/posts/6VjjbLh4Zcy]
Douglas Crockford: 〈The Better Parts〉 at JSConfUY 2014. (jump to 18:50 for the “the Bads Parts Reconsidered”)

Summary of the “Better Parts”

Douglas Crockford stopped using Object.create(). Because he stopped using this. And he stopped using new long ago.

• Stopped using “for loops”. Instead, use myArray.forEach(), myArray.map(), etc. [see JS: Array.prototype]

• Stopped using for in … anymore. Use Object.keys(obj).forEach(f) instead. [see JS: Access Property]

• Use ES6's tail recursion feature, instead of while statement.

Like it? Help me by telling your friends. Or, Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.

Web Dev Tutorials