Skip to content

Instantly share code, notes, and snippets.

@paxelpixel
Last active May 28, 2018 23:21
Show Gist options
  • Select an option

  • Save paxelpixel/13a043999a63f83afccd316e7d8a10e3 to your computer and use it in GitHub Desktop.

Select an option

Save paxelpixel/13a043999a63f83afccd316e7d8a10e3 to your computer and use it in GitHub Desktop.

Revisions

  1. paxelpixel revised this gist May 28, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lexical_scope.js
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,4 @@ function doImportantStuff() {
    reportImportantStuff();
    }

    doUsefulThing();
    doImportantStuff();
  2. paxelpixel revised this gist May 28, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions lexical_scope.js
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    function doImportantStuff() {
    var someVariable = "important stuff";

    function someImportantStuff() {
    function reportImportantStuff() {
    console.log(someVariable) // "important stuff"
    }

    someUsefulThing();
    reportImportantStuff();
    }

    doUsefulThing();
  3. paxelpixel revised this gist May 28, 2018. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions lexical_scope.js
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    function doUsefulThing() {
    var someVariable = "useful stuff";
    function doImportantStuff() {
    var someVariable = "important stuff";

    function someUsefulThing() {
    console.log(someVariable) // "useful stuff"
    function someImportantStuff() {
    console.log(someVariable) // "important stuff"
    }

    someUsefulThing();
  4. paxelpixel renamed this gist May 28, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. paxelpixel revised this gist May 28, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion index.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,10 @@
    function doUsefulThing() {
    var someVariable = "useful stuff";

    function someUsefulThing() {
    console.log(someVariable) // "useful stuff"
    }

    someUsefulThing();
    }

  6. paxelpixel renamed this gist May 28, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. paxelpixel created this gist May 28, 2018.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    function doUsefulThing() {
    var someVariable = "useful stuff";
    function someUsefulThing() {
    console.log(someVariable) // "useful stuff"
    }

    someUsefulThing();
    }

    doUsefulThing();