How to handle errors in Javascript using try catch #shorts

preview_player
Показать описание

My VSCode Extensions:
- theme: material community high contrast
- fonts: Menlo, Monaco, 'Courier New', monospace
- errors: Error Lens
- extra git help: Git Lens
- tailwind css intellisense
- indent rainbow
- material icon theme
- prettier & eslint
- ES7+ React Snippets
Рекомендации по теме
Комментарии
Автор

I've been looking for a simple and quick explanation of this for a couple of days now, thank you so much!!

createcultivate
Автор

finally a clear explanation of tr-catch, thanks

songjoowan
Автор

ha ha.. perfect example of Murphy's Law

chaitu
Автор

nice! I do very often console.error then. In node for example it's a good way to display exception and in some cases log exception to the file (in catch).

nowieszco
Автор

Me after watching this... " try { let a = 0; } catch { console.log("variable not declared") } "

AndrewTSq