Skip to content

Instantly share code, notes, and snippets.

@anvaka
Created March 13, 2013 20:01
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 anvaka/5155610 to your computer and use it in GitHub Desktop.
Save anvaka/5155610 to your computer and use it in GitHub Desktop.
// what needs to be changed in this code, to satsify requirements below:
function () {
function foo() {
var a = 42,
b = function () { console.log('hi'); };
}
// a and b should be available in this scope (but not the outter)
// No other modifications to this scope are allowed
function bar() {
// could use a, b.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment