Skip to content

Commit

Permalink
fixed minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Chu committed Feb 10, 2012
1 parent d8ceed3 commit 933e917
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scopes/run.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
function outer_scope(){
var a = 'I am `a` from outer scope',
b = 'I am `b` from outer scope';

console.log( 'logging from outer scope before inner scope function declaration' );
console.log( 'a: ' + a );
console.log( 'b: ' + b );
console.log( '------------------------------------------' );

function inner_scope_1(){
console.log( 'logging from inside function inner_scope_1 before variable declaration' );
console.log( 'a: ' + a );
Expand All @@ -15,7 +15,7 @@ function outer_scope(){
console.log( 'a: ' + a );
console.log( '------------------------------------------' );
}

function inner_scope_2(){
console.log( 'logging from inside function inner_scope_2 before variable declaration' );
console.log( 'b: ' + b );
Expand All @@ -24,15 +24,15 @@ function outer_scope(){
console.log( 'b: ' + b );
console.log( '------------------------------------------' );
}

inner_scope_1();
inner_scope_2();

a = 'I will be the new `a`';
b = 'I will be the new `b`';

console.log( 'logging from outer scope after inner scope executed' );
console.log( 'b: ' + b );
console.log( 'a: ' + a );
console.log( 'b: ' + b );
console.log( '------------------------------------------' );
}
Expand Down

0 comments on commit 933e917

Please sign in to comment.