Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created January 31, 2013 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/4679030 to your computer and use it in GitHub Desktop.
Save tmcw/4679030 to your computer and use it in GitHub Desktop.
// mistakes
// works, loops don't work yet
function closure(x) {
return function() {
return x;
}
}
var c = closure('hello world');
c();
var doublerainbow = closure(c);
doublerainbow()();
var x = 10;
x == '10'; // nice equals
x === '10'; // strict equals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment