Interesting, I didn't think of trying it while writing the article but I just tried this:
try{throwundefined}catch(error){console.log((errorasError).message)}finally{console.log('this will log');}console.log('code here is unreachable because "catch" threw a TypeError')
And yes, finally will run but your application will still be unstable. I will add an edit shortly in the article to clarify that point. Thanks for the feedback
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting, I didn't think of trying it while writing the article but I just tried this:
And yes,
finallywill run but your application will still be unstable. I will add an edit shortly in the article to clarify that point. Thanks for the feedback