Comments on: Back to the Future, Explained http://stephenwoods.net/2009/08/06/back-to-the-future-explained/ !important Wed, 03 Aug 2011 16:09:43 +0000 hourly 1 http://wordpress.org/?v=3.2.1 By: Isaac Z. Schlueterhttp://stephenwoods.net/2009/08/06/back-to-the-future-explained/comment-page-1/#comment-23 Isaac Z. Schlueter Mon, 24 Aug 2009 19:04:21 +0000 http://stephenwoods.net/?p=99#comment-23 You can do it with less code:<code>var dadWriter = false;var marty = { isDadWriter : (function () { var dad = dadWriter; return function () { return dadWriter; }; })() };print(marty.isDadWriter()); //false dadWriter = true; print(marty.isDadWriter()); //false</code> You can do it with less code:

var dadWriter = false;

var marty = {
isDadWriter : (function () {
var dad = dadWriter;
return function () {
return dadWriter;
};
})()
};

print(marty.isDadWriter()); //false
dadWriter = true;
print(marty.isDadWriter()); //false

]]>
By: Zach Leathermanhttp://stephenwoods.net/2009/08/06/back-to-the-future-explained/comment-page-1/#comment-17 Zach Leatherman Fri, 07 Aug 2009 12:58:24 +0000 http://stephenwoods.net/?p=99#comment-17 Yes, this is awesome!Can you supply a code sample to describe Einstein the dog? Yes, this is awesome!

Can you supply a code sample to describe Einstein the dog?

]]>