
Notifications
Clear all
How do you handle errors in JavaScript?
0
18/11/2023 6:44 am
Topic starter

How do you handle errors in JavaScript?
Answer
Add a comment
Add a comment
1 Answer
0
21/11/2023 7:05 pm
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 // … }
Add a comment
Add a comment
Forum Information
- 22 Forums
- 1,969 Topics
- 5,307 Posts
- 1 Online
- 1,282 Members
Our newest member: TimothySenue
Latest Post: Space bug using " & n b s p ; "
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed