Skip to content

Instantly share code, notes, and snippets.

@iam-peekay
Last active April 28, 2016 16:08
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 iam-peekay/1beb556bfacc91a7094d0e4ff15d9107 to your computer and use it in GitHub Desktop.
Save iam-peekay/1beb556bfacc91a7094d0e4ff15d9107 to your computer and use it in GitHub Desktop.
GlobalEnvironment = {
EnvironmentRecord: {
// built-in identifiers
Array: '<func>',
Object: '<func>',
// etc...
// custom identifiers
mysteriousCalculator: '<func>',
toFixedTwoPlaces: '<func>',
},
outer: null,
};
mysteriousCalculatorEnvironment = {
EnvironmentRecord: {
a: 10.01,
b: 2.01,
mysteriousVariable: 3,
}
outer: GlobalEnvironment,
};
addEnvironment = {
EnvironmentRecord: {
result: 15.02
}
outer: mysteriousCalculatorEnvironment,
};
subtractEnvironment = {
EnvironmentRecord: {
result: 5.00
}
outer: mysteriousCalculatorEnvironment,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment