20. May 2012
Valentin Simonov on Programming
25
Aug
JavaScript lazy functions.
I never thought about lazy functions in JavaScript. Apparently, you can implement it this way:
var foo = function() {
var t = new Date();
foo = function() {
return t;
};
return foo();
};
I hate JavaScript.
Tags: JavaScript, Lazy
-
http://www.wonderwhy-er.com wonderwhy-er
