JavaScript Question: Should I Use try catch or an if Conditional?

preview_player
Показать описание
Try catch is great for exception handling. But it is possible to use an if conditional in certain situations where try catch is used. We look at that in this tutorial and talk about reasons to use or not use try catch.

For a complete list of all our tutorials:

Take the Learn Modern JavaScript: Getting Started or the Learn Modern JavaScript: Advanced Topics courses at a huge discount:
Рекомендации по теме
Комментарии
Автор

Try Catch is so tempting to use but it all the wrong places. 😂Thanks for the advice, much appreciated! Merry Xmas! 🎅

karlstenator
Автор

this is also same for all the other languages...

dibbyo
Автор

Nicely explained. I was wondering when to use it and when not to and you gave some great points. Thanks!

leecastelani
Автор

I'm a beginner in Kotlin, I was wondering why use one over the other. I think you're the only one who explains this on YouTube. Thanks a lot!

soontaek
Автор

woah woah woah, that function checking using if else statement was way tooo cool!
needed to watch that video long ago.

chirag_soni_