Last active
May 17, 2016 18:19
-
-
Save dpaez/cfb7e998ed4aa05acaa0f0a8a213f9c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
console.log('------------------Let------------------------'); | |
let x = 5; | |
console.log( 'START scope global > x', x ); | |
function pruebaLet(){ | |
let x = 2; | |
console.log( '\tscope prueba Let' ); | |
console.log( '\tx >', x ); | |
if (true){ | |
let x = 100 | |
console.log('\t\tscope bloque if x >', x) | |
}; | |
console.log( '\tx luego de bloque if >', x ); | |
console.log( '\tFIN scope prueba Let' ); | |
} | |
pruebaLet(); | |
console.log( 'END scope global > x', x ); | |
console.log('------------------Var------------------------'); | |
var y = 5; | |
console.log( 'START scope global > y', y ); | |
function pruebaLet2(){ | |
var y = 2; | |
console.log( '\tscope prueba Let' ); | |
console.log( '\ty', y ); | |
if (true){ | |
var y = 200; | |
console.log('\t\tscope bloque if y', y) | |
}; | |
console.log( '\ty luego de bloque if >', y ); | |
console.log( '\tFIN scope prueba Let' ); | |
} | |
pruebaLet2(); | |
console.log( 'END scope global > y', y ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment