How do you handle e…
 
Notifications
Clear all

How do you handle errors in JavaScript?

1 Posts
2 Users
0 Likes
249 Views
0
Topic starter

How do you handle errors in JavaScript?

1 Answer
0

When an error occurs, JavaScript generates an object containing the details about it. The object is then passed as an argument to catch : try { // … } catch ( err ) { // <– the “error object”, could use another word instead of err // … }

Share: