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
/* This gist demonstrates how errors bubble up (or not) through the call stack | |
* depending on where you place your try-catch blocks | |
* | |
* You will get different results by reverse-commenting the two versions of the | |
* 'result' variable in topLevel() | |
* */ | |
const topLevel = function(bool=false){ | |
let name = topLevel.name; | |
try { |