10.07.2017 Views

javascript_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Output<br />

Click the following to see the result:<br />

Click Me<br />

Try running after fixing the problem with method name.<br />

The throw Statement<br />

You can use a throw statement to raise your built-in exceptions or your<br />

customized exceptions. Later these exceptions can be captured and you can take<br />

an appropriate action.<br />

Example<br />

The following example demonstrates how to use a throw statement.<br />

<br />

<br />

<br />

<br />

<br />

348

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!