Last active
August 9, 2022 10:26
-
-
Save re4388/24b6b8055521993827fe09e1572cba86 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 helloWord(arg1, collectionUID){ | |
console.log(collectionUID); // undefined | |
collectionUID = "222" | |
console.log(collectionUID); // 222 | |
try { | |
console.log(arg1) | |
console.log(collectionUID) | |
throw new Error("oh no") | |
} catch (error) { | |
console.log(error) | |
throw error | |
} | |
} | |
function f1(){ | |
let collectionUID = undefined | |
try { | |
console.log("go in") | |
console.log(collectionUID); | |
helloWord('arg1', collectionUID) | |
} catch (error) { | |
console.log(collectionUID) // <-- still undeinfed | |
} | |
} | |
f1() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment