Debugging

You can debug the code using debugger keyword. Just add this keyword before the line where you want to debug the code. In Webstom and browser as well, it shows the state of script at the debugging point.

Error handling

You can easily handle errors using try .. catch .. finally in JavaScript. Your code should be placed in try block. If any exception is thrown, catch block can be used to catch the exception and take appropriate action. Catch block gets executed only when the exception is thrown. But Finally block is always executed.

Youtube | Facebook | Twitter | Website Home | Online Grocery Shopping Brisbane