Skip to content

Instantly share code, notes, and snippets.

The future is here: Classless object-oriented programming in JavaScript.

Douglas Crockford, author of JavaScript: The Good parts, recently gave a talk called The Better Parts, where he demonstrates how he creates objects in JavaScript nowadays. He doesn't call his approach anything, but I will refer to it as Crockford Classless.

Crockford Classless is completely free of class, new, this, prototype and even Crockfords own invention Object.create.

I think it's really, really sleek, and this is what it looks like:

function dog(spec) {
@cheung31
cheung31 / livefyre.load.js
Created November 3, 2012 18:30 — forked from ogorzalka/livefyre.load.js
Livefyre - Chinese Traditional Localized strings
(function () {
var articleId = fyre.conv.load.makeArticleId(null);
fyre.conv.load({
"strings": {
"signIn": "註冊",
"signInGuest": "Se connecter en invit\u00e9",
"signOut": "D\u00e9connexion",
"editProfile": "\u00c9diter le profil",
"siteAdmin": "Administration",
"postButton": "郵寄",