var global=100; function temp1( ){ function temp2(){ function temp3(){ var global=400; console.log(global) } var global = temp3; temp3(); console.log(global) } var global=temp2; temp2() console.log(global) } temp1( )