Last active
August 29, 2015 14:04
-
-
Save rodyhaddad/a10b03286b23638c4b94 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
function test() { | |
if (true) { | |
let x = 1; | |
} | |
try{ | |
log(x); | |
} catch(e){console.log(e)} | |
if (typeof x !== 'undefined') console.log(x); | |
// ----------- | |
if (false) { | |
let y = 1; | |
} | |
try{ | |
log(y); | |
} catch(e){console.log(e)} | |
if (typeof y !== 'undefined') console. log(y) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment