Translate

Monday, May 5, 2014

11. Try ... Catch statement

In this lesson we will learn from the Error JavaScript , we did not know before .
It is very important for you to create a website because the Error tab eliminate the the Message Error visitors . try ... catch statement allows us to find Error code when being processed . Try block contains the code for performance , whereas catch statement minute load to carry when we code in the Try block Error.
common forms

try{
//Run some code here
}
catch(err){
//Handle errors here
}
example
១១. Try...Catch statement
In the above example in the function message () We have a blog try Error by writing false alert.Like this, it will not run code in to try blog is it implemented in the catch blog.

0 comments:

Post a Comment