The ECMAScript2019 specification means it is now optional to use the error parameter inside the catch block of a try…catch statement.
Originally published by Dr. Derek Austin at https://medium.com
Let’s look at a demo on processing JSON objects to see how it works.
Not sure how JSON.parse() works?
Try…catch statements are commonly used with promises and asynchronous functions
Is not referencing caught errors always useful? No, of course not. There are times when you do want to display the caught error itself.
However, there are cases where the error is not particularly informative, such as the SyntaxError that comes from JSON.parse().
In those cases, it can be useful to not reference the caught error by name.
Thanks for reading ❤
If you liked this post, please do share/like it with all of your programming buddies!
Looking for an attractive & user-friendly web developer? HourlyDeveloper.io, a leading web, and mobile app development company, offers web developers for hire through flexible engagement models. You can **[Hire Web...
With the rapid development in technology, the old ways to do business have changed completely. A lot more advanced and developed ways are ...
You name the business and I will tell you how web development can help you promote your business. If it is a startup or you seeking some...
Build your eCommerce project by hiring our expert eCommerce Website developers. Our Dedicated Web Designers develop powerful & robust website in a short span of time.
This article covers A-Z about the mobile and web app development process and answers your question on how long does it take to develop/build an app.