Actual-events
- try using
try-catch and throw for verbose simplification.
- in
try-catch
you can use the error in catch to get the error.name, error.message , error.stack
- try catch also has
finally which
- After try or catch executes the statement inside finally
- It can also bypass return - meaning if inside a function and you return after try or catch - normally you'd exit the function but using finally you exit AND execute the statements in the
finally clause
This div only prints random numbers above 5 withing 10:
[check console for other wise]
OOPS