Skip to content

Instantly share code, notes, and snippets.

@steckel
Created April 26, 2012 01:04
Show Gist options
  • Save steckel/2494943 to your computer and use it in GitHub Desktop.
Save steckel/2494943 to your computer and use it in GitHub Desktop.
Quickie
sayHello2 = (name) ->
text = "Hello #{name}"
sayAlert = ->
alert text
sayAlert()
(function() {
var sayHello2;
sayHello2 = function(name) {
var sayAlert, text;
text = "Hello " + name;
sayAlert = function() {
return alert(text);
};
return sayAlert();
};
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment