In JavaScript, the interaction between return, await, and finally can cause subtle issues that developers should be aware of. Here are some key gotchas:
- The
finallyblock runs regardless of whether areturn,throw, or an exception occurs intryorcatch. - If
finallyhas areturn, it overrides any return value or thrown error fromtryorcatch.
function test() {
try {
return "from try";








