0

Error handling

https://code.sololearn.com/WtkcT3ts8uHW/?ref=app Can u write an error handling code for this.

23rd Oct 2021, 10:40 AM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar
5 Antworten
+ 2
JavaScript Errors - Throw and Try to Catch https://www.w3schools.com/js/js_errors.asp Keep learning & happy coding :D
23rd Oct 2021, 10:54 AM
SoloProg
SoloProg - avatar
+ 1
Learn try and catch like if(condition){ try{ return 'result'; catch(error){ return '2result'; }
23rd Oct 2021, 3:46 PM
Taha Mansoor
Taha Mansoor - avatar
0
Can you please be a bit more specific. Because I do not know where to write the try and catch
23rd Oct 2021, 11:33 AM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar
23rd Oct 2021, 2:28 PM
zexu knub
zexu knub - avatar
0
I tried puting try around the whole thing and then catch after it . Still showed error. that's why I asked someone to do it. I tried writing it in different places. still doesn't seem to work.
24th Oct 2021, 2:23 AM
Joel Sebastian Jijo
Joel Sebastian Jijo - avatar