Skip to content

Instantly share code, notes, and snippets.

@Dosant
Created February 26, 2017 07:17
Show Gist options
  • Save Dosant/06420b5a4efc2706fefb90da95ae9cbf to your computer and use it in GitHub Desktop.
Save Dosant/06420b5a4efc2706fefb90da95ae9cbf to your computer and use it in GitHub Desktop.
var foo = function () {
var a = 3;
var b = 5;
var bar = function () {
var b = 7;
var c = 11; // a === 3, b === 7, c === 11
a += b + c; // a === 21, b === 7, c === 11
};
// a === 3, b === 5, c === undefined
bar();
// a === 21, b === 5, c === undefined
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment