Elegant error handling with the JavaScript Either Monad

added by JavaScript Kicks
5/16/2019 7:25:26 AM

525 Views

JavaScript gives us a built-in language feature for handling exceptions: try...catch statements. And they're better than littering our code with if-statements. But they can be problematic. And they are not the only way to handle errors. In this article, we'll take a look at using the 'Either monad' as an alternative to try...catch.


0 comments