The throw statement is used to throw a defined exception. The execution of the current function will be stopped (the instructions located after the throw instruction will not be executed) and control will be passed to the first catch block. If there is no catch block, the program will be terminated.
With ECMAScript 2019/ES10, we have an Optional Catch Binding: we can use try/catch without creating an unused binding and we are free to go ahead make use of catch block without a param, you can see below the example:

try {
throw new Error ('some error')
}catch{
console.log('errorMessage')
}
// 'errorMessage'

If you like this article share and clap 👏 👏. Thanks!

--

--

Photo by Alexandru Acea on Unsplash

What’s new with the new version of React ?

When released, React 18 will include improvements (Automatic Batch Processing), new API (start Transition), and a new streaming server renderer with built-in support for React.lazy.

These features are made possible by a new registration mechanism we’re adding in React 18. It’s called “concurrent rendering” and allows React to prepare multiple versions of the UI simultaneously. This change is mostly behind the scenes, but it opens up new possibilities to improve actual performance.

I will talk about these new features in more detail in my next articles.

Follow me ;) ………..

--

--

JavaScript helps developers to create dynamic web pages. It is a light language and easy to integrate. The difference between JavaScript and TypeScript is that JavaScript is a client-side scripting language and TypeScript is a object-oriented programming languages and has a type checker.

💪 TS = JS + additional functions

--

--

solid state device or solid state disk

After having had bad user experience with HDD or hard disk drives due to their mechanical malfunction and consequently the loss or damage of stored data.
The technology of SDD is purely electronic it does not mean the malfunction or the damage of the device but the risk is less high and also another strong point is super fast compared to the HDD

--

--