throw statement can be used within a try block of code to create your own run-time errors.
Note: If no catch block exists among caller functions, the program will terminate.
Please do google search for:
Join Our Channel
This channel is primarily useful for Full Stack Web Developer.