Skip to content

Instantly share code, notes, and snippets.

@alexweber
Last active April 15, 2016 17:55
Show Gist options
  • Select an option

  • Save alexweber/a62eeaceb86029f0b7abf91884e70671 to your computer and use it in GitHub Desktop.

Select an option

Save alexweber/a62eeaceb86029f0b7abf91884e70671 to your computer and use it in GitHub Desktop.

Revisions

  1. Alex Weber renamed this gist Apr 15, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Alex Weber revised this gist Apr 15, 2016. No changes.
  3. Alex Weber revised this gist Apr 15, 2016. 3 changed files with 21 additions and 16 deletions.
    8 changes: 0 additions & 8 deletions example1.js
    Original file line number Diff line number Diff line change
    @@ -1,8 +0,0 @@
    var foo = 1;
    function bar() {
    if (!foo) {
    var foo = 10;
    }
    alert(foo);
    }
    bar();
    8 changes: 0 additions & 8 deletions example2
    Original file line number Diff line number Diff line change
    @@ -1,8 +0,0 @@
    var a = 1;
    function b() {
    a = 10;
    return;
    function a() {}
    }
    b();
    alert(a);
    21 changes: 21 additions & 0 deletions examples.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    // Example 1
    var foo = 1;
    function bar() {
    if (!foo) {
    var foo = 10;
    }
    alert(foo);
    }
    bar();



    // Example 2
    var a = 1;
    function b() {
    a = 10;
    return;
    function a() {}
    }
    b();
    alert(a);
  4. Alex Weber created this gist Apr 15, 2016.
    8 changes: 8 additions & 0 deletions example1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    var foo = 1;
    function bar() {
    if (!foo) {
    var foo = 10;
    }
    alert(foo);
    }
    bar();
    8 changes: 8 additions & 0 deletions example2
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    var a = 1;
    function b() {
    a = 10;
    return;
    function a() {}
    }
    b();
    alert(a);