Skip to content

Instantly share code, notes, and snippets.

@re4388
Last active August 9, 2022 10:26
Show Gist options
  • Save re4388/24b6b8055521993827fe09e1572cba86 to your computer and use it in GitHub Desktop.
Save re4388/24b6b8055521993827fe09e1572cba86 to your computer and use it in GitHub Desktop.
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