DEV Community

Discussion on: The fight between Try-Catch and If-Else

Collapse
 
mquanit profile image
Mohammad Quanit

try-catch for asynchronous operations and if-else for non-async operations.
I usually use try-catch for async-await which makes code clean and precise instead of promises.